Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(192)

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 1858633003: bluetooth: Populate Web Bluetooth blacklist from variations:: parameter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comment fixes Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 2002 matching lines...) Expand 10 before | Expand all | Expand 10 after
2013 if (content_settings->GetContentSetting(GURL(requesting_origin.Serialize()), 2013 if (content_settings->GetContentSetting(GURL(requesting_origin.Serialize()),
2014 GURL(embedding_origin.Serialize()), 2014 GURL(embedding_origin.Serialize()),
2015 CONTENT_SETTINGS_TYPE_BLUETOOTH_GUARD, 2015 CONTENT_SETTINGS_TYPE_BLUETOOTH_GUARD,
2016 std::string()) == 2016 std::string()) ==
2017 CONTENT_SETTING_BLOCK) { 2017 CONTENT_SETTING_BLOCK) {
2018 return AllowWebBluetoothResult::BLOCK_POLICY; 2018 return AllowWebBluetoothResult::BLOCK_POLICY;
2019 } 2019 }
2020 return AllowWebBluetoothResult::ALLOW; 2020 return AllowWebBluetoothResult::ALLOW;
2021 } 2021 }
2022 2022
2023 std::string ChromeContentBrowserClient::GetWebBluetoothBlacklist() {
2024 return variations::GetVariationParamValue("WebBluetoothBlacklist",
2025 "blacklist_additions");
2026 }
2027
2023 net::URLRequestContext* 2028 net::URLRequestContext*
2024 ChromeContentBrowserClient::OverrideRequestContextForURL( 2029 ChromeContentBrowserClient::OverrideRequestContextForURL(
2025 const GURL& url, content::ResourceContext* context) { 2030 const GURL& url, content::ResourceContext* context) {
2026 DCHECK_CURRENTLY_ON(BrowserThread::IO); 2031 DCHECK_CURRENTLY_ON(BrowserThread::IO);
2027 #if defined(ENABLE_EXTENSIONS) 2032 #if defined(ENABLE_EXTENSIONS)
2028 if (url.SchemeIs(extensions::kExtensionScheme)) { 2033 if (url.SchemeIs(extensions::kExtensionScheme)) {
2029 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context); 2034 ProfileIOData* io_data = ProfileIOData::FromResourceContext(context);
2030 return io_data->extensions_request_context(); 2035 return io_data->extensions_request_context();
2031 } 2036 }
2032 #endif 2037 #endif
(...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after
2975 if (channel <= kMaxDisableEncryptionChannel) { 2980 if (channel <= kMaxDisableEncryptionChannel) {
2976 static const char* const kWebRtcDevSwitchNames[] = { 2981 static const char* const kWebRtcDevSwitchNames[] = {
2977 switches::kDisableWebRtcEncryption, 2982 switches::kDisableWebRtcEncryption,
2978 }; 2983 };
2979 to_command_line->CopySwitchesFrom(from_command_line, 2984 to_command_line->CopySwitchesFrom(from_command_line,
2980 kWebRtcDevSwitchNames, 2985 kWebRtcDevSwitchNames,
2981 arraysize(kWebRtcDevSwitchNames)); 2986 arraysize(kWebRtcDevSwitchNames));
2982 } 2987 }
2983 } 2988 }
2984 #endif // defined(ENABLE_WEBRTC) 2989 #endif // defined(ENABLE_WEBRTC)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698