Chromium Code Reviews| Index: chrome/browser/chrome_content_browser_client.cc |
| diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc |
| index 4af0317ba8f27162b01678409a20ac0abeeff951..c7dc54b138e8fd4fde1be9bfa5dca3a2d6c696cb 100644 |
| --- a/chrome/browser/chrome_content_browser_client.cc |
| +++ b/chrome/browser/chrome_content_browser_client.cc |
| @@ -117,6 +117,7 @@ |
| #include "components/google/core/browser/google_util.h" |
| #include "components/metrics/client_info.h" |
| #include "components/net_log/chrome_net_log.h" |
| +#include "components/policy/core/common/policy_service.h" |
| #include "components/pref_registry/pref_registry_syncable.h" |
| #include "components/prefs/pref_service.h" |
| #include "components/prefs/scoped_user_pref_update.h" |
| @@ -158,11 +159,13 @@ |
| #include "net/cookies/canonical_cookie.h" |
| #include "net/cookies/cookie_options.h" |
| #include "net/ssl/ssl_cert_request_info.h" |
| +#include "policy/policy_constants.h" |
| #include "ppapi/host/ppapi_host.h" |
| #include "storage/browser/fileapi/external_mount_points.h" |
| #include "ui/base/l10n/l10n_util.h" |
| #include "ui/base/resource/resource_bundle.h" |
| #include "ui/resources/grit/ui_resources.h" |
| +#include "url/origin.h" |
| #if defined(OS_WIN) |
| #include "base/strings/string_tokenizer.h" |
| @@ -1986,6 +1989,19 @@ bool ChromeContentBrowserClient::AllowKeygen( |
| CONTENT_SETTING_ALLOW; |
| } |
| +bool ChromeContentBrowserClient::AllowWebBluetooth() { |
| + const base::Value* policy_value = |
|
bartfab (slow)
2016/02/25 17:37:50
Nit 1: #include "base/values.h"
Nit 2: const point
|
| + g_browser_process->policy_service() |
| + ->GetPolicies(policy::PolicyNamespace(policy::POLICY_DOMAIN_CHROME, |
|
bartfab (slow)
2016/02/25 17:37:50
Nit: #include "components/policy/core/common/polic
|
| + std::string())) |
| + .GetValue(policy::key::kDefaultWebBluetoothGuardSetting); |
|
bartfab (slow)
2016/02/25 17:37:50
You documented this policy as being per-profile, b
|
| + int int_value; |
| + if (policy_value && policy_value->GetAsInteger(&int_value)) { |
|
bartfab (slow)
2016/02/25 17:37:50
99% of policies are implemented differently:
- Def
Jeffrey Yasskin
2016/02/25 20:38:50
Done, which covers the previous 3 comments too.
|
| + return int_value != CONTENT_SETTING_BLOCK; |
| + } |
| + return true; |
| +} |
| + |
| net::URLRequestContext* |
| ChromeContentBrowserClient::OverrideRequestContextForURL( |
| const GURL& url, content::ResourceContext* context) { |