Commit 0002875d authored by Rayan Kanso's avatar Rayan Kanso Committed by Commit Bot

[gIRA] Return an empty list when off the record.

Bug: 1045506
Change-Id: I3e8b192331c848241848e754ffde0309b620efcc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2022669
Commit-Queue: Rayan Kanso <rayankans@chromium.org>
Commit-Queue: Peter Beverloo <peter@chromium.org>
Auto-Submit: Rayan Kanso <rayankans@chromium.org>
Reviewed-by: default avatarPeter Beverloo <peter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735432}
parent 2f74d0ed
...@@ -2,10 +2,12 @@ ...@@ -2,10 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "build/build_config.h"
#include "content/browser/installedapp/installed_app_provider_impl.h" #include "content/browser/installedapp/installed_app_provider_impl.h"
#include "build/build_config.h"
#include "content/browser/installedapp/installed_app_provider_impl_win.h" #include "content/browser/installedapp/installed_app_provider_impl_win.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/common/content_features.h" #include "content/public/common/content_features.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h" #include "mojo/public/cpp/bindings/self_owned_receiver.h"
...@@ -21,6 +23,11 @@ void InstalledAppProviderImpl::FilterInstalledApps( ...@@ -21,6 +23,11 @@ void InstalledAppProviderImpl::FilterInstalledApps(
std::vector<blink::mojom::RelatedApplicationPtr> related_apps, std::vector<blink::mojom::RelatedApplicationPtr> related_apps,
const GURL& manifest_url, const GURL& manifest_url,
FilterInstalledAppsCallback callback) { FilterInstalledAppsCallback callback) {
if (render_frame_host_->GetProcess()->GetBrowserContext()->IsOffTheRecord()) {
std::move(callback).Run(std::vector<blink::mojom::RelatedApplicationPtr>());
return;
}
bool is_implemented = false; bool is_implemented = false;
if (base::FeatureList::IsEnabled(features::kInstalledAppProvider)) { if (base::FeatureList::IsEnabled(features::kInstalledAppProvider)) {
#if defined(OS_WIN) #if defined(OS_WIN)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment