OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/app/breakpad_mac.h" | 8 #include "chrome/app/breakpad_mac.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/character_encoding.h" | 10 #include "chrome/browser/character_encoding.h" |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 | 243 |
244 PrefService* prefs = process->profile()->GetPrefs(); | 244 PrefService* prefs = process->profile()->GetPrefs(); |
245 // Currently this pref is only registered if applied via a policy. | 245 // Currently this pref is only registered if applied via a policy. |
246 if (prefs->HasPrefPath(prefs::kDisable3DAPIs) && | 246 if (prefs->HasPrefPath(prefs::kDisable3DAPIs) && |
247 prefs->GetBoolean(prefs::kDisable3DAPIs)) { | 247 prefs->GetBoolean(prefs::kDisable3DAPIs)) { |
248 // Turn this policy into a command line switch. | 248 // Turn this policy into a command line switch. |
249 command_line->AppendSwitch(switches::kDisable3DAPIs); | 249 command_line->AppendSwitch(switches::kDisable3DAPIs); |
250 } | 250 } |
251 | 251 |
252 // Disable client-side phishing detection in the renderer if it is disabled | 252 // Disable client-side phishing detection in the renderer if it is disabled |
253 // in the browser process. | 253 // in the Profile preferences or the browser process. |
254 if (!g_browser_process->safe_browsing_detection_service()) | 254 if (!prefs->GetBoolean(prefs::kSafeBrowsingEnabled) || |
| 255 !g_browser_process->safe_browsing_detection_service()) { |
255 command_line->AppendSwitch(switches::kDisableClientSidePhishingDetection); | 256 command_line->AppendSwitch(switches::kDisableClientSidePhishingDetection); |
| 257 } |
256 | 258 |
257 static const char* const kSwitchNames[] = { | 259 static const char* const kSwitchNames[] = { |
258 switches::kAllowHTTPBackgroundPage, | 260 switches::kAllowHTTPBackgroundPage, |
259 switches::kAllowScriptingGallery, | 261 switches::kAllowScriptingGallery, |
260 switches::kAppsCheckoutURL, | 262 switches::kAppsCheckoutURL, |
261 switches::kAppsGalleryURL, | 263 switches::kAppsGalleryURL, |
262 switches::kDebugPrint, | 264 switches::kDebugPrint, |
263 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS) && !defined(OS_MACOSX) | 265 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS) && !defined(OS_MACOSX) |
264 // Enabled by default in Google Chrome builds, except on CrOS. | 266 // Enabled by default in Google Chrome builds, except on CrOS. |
265 switches::kDisablePrintPreview, | 267 switches::kDisablePrintPreview, |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
630 #if defined(USE_NSS) | 632 #if defined(USE_NSS) |
631 crypto::CryptoModuleBlockingPasswordDelegate* | 633 crypto::CryptoModuleBlockingPasswordDelegate* |
632 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 634 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
633 const GURL& url) { | 635 const GURL& url) { |
634 return browser::NewCryptoModuleBlockingDialogDelegate( | 636 return browser::NewCryptoModuleBlockingDialogDelegate( |
635 browser::kCryptoModulePasswordKeygen, url.host()); | 637 browser::kCryptoModulePasswordKeygen, url.host()); |
636 } | 638 } |
637 #endif | 639 #endif |
638 | 640 |
639 } // namespace chrome | 641 } // namespace chrome |
OLD | NEW |