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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 | 275 |
276 PrefService* prefs = process->profile()->GetPrefs(); | 276 PrefService* prefs = process->profile()->GetPrefs(); |
277 // Currently this pref is only registered if applied via a policy. | 277 // Currently this pref is only registered if applied via a policy. |
278 if (prefs->HasPrefPath(prefs::kDisable3DAPIs) && | 278 if (prefs->HasPrefPath(prefs::kDisable3DAPIs) && |
279 prefs->GetBoolean(prefs::kDisable3DAPIs)) { | 279 prefs->GetBoolean(prefs::kDisable3DAPIs)) { |
280 // Turn this policy into a command line switch. | 280 // Turn this policy into a command line switch. |
281 command_line->AppendSwitch(switches::kDisable3DAPIs); | 281 command_line->AppendSwitch(switches::kDisable3DAPIs); |
282 } | 282 } |
283 | 283 |
284 // Disable client-side phishing detection in the renderer if it is disabled | 284 // Disable client-side phishing detection in the renderer if it is disabled |
285 // in the browser process. | 285 // in the Profile preferences or the browser process. |
286 if (!g_browser_process->safe_browsing_detection_service()) | 286 if (!prefs->GetBoolean(prefs::kSafeBrowsingEnabled) || |
| 287 !g_browser_process->safe_browsing_detection_service()) { |
287 command_line->AppendSwitch(switches::kDisableClientSidePhishingDetection); | 288 command_line->AppendSwitch(switches::kDisableClientSidePhishingDetection); |
| 289 } |
288 | 290 |
289 static const char* const kSwitchNames[] = { | 291 static const char* const kSwitchNames[] = { |
290 switches::kAllowHTTPBackgroundPage, | 292 switches::kAllowHTTPBackgroundPage, |
291 switches::kAllowScriptingGallery, | 293 switches::kAllowScriptingGallery, |
292 switches::kAppsCheckoutURL, | 294 switches::kAppsCheckoutURL, |
293 switches::kAppsGalleryURL, | 295 switches::kAppsGalleryURL, |
294 switches::kDebugPrint, | 296 switches::kDebugPrint, |
295 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS) && !defined(OS_MACOSX) | 297 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS) && !defined(OS_MACOSX) |
296 // Enabled by default in Google Chrome builds, except on CrOS. | 298 // Enabled by default in Google Chrome builds, except on CrOS. |
297 switches::kDisablePrintPreview, | 299 switches::kDisablePrintPreview, |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 #if defined(USE_NSS) | 664 #if defined(USE_NSS) |
663 crypto::CryptoModuleBlockingPasswordDelegate* | 665 crypto::CryptoModuleBlockingPasswordDelegate* |
664 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 666 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
665 const GURL& url) { | 667 const GURL& url) { |
666 return browser::NewCryptoModuleBlockingDialogDelegate( | 668 return browser::NewCryptoModuleBlockingDialogDelegate( |
667 browser::kCryptoModulePasswordKeygen, url.host()); | 669 browser::kCryptoModulePasswordKeygen, url.host()); |
668 } | 670 } |
669 #endif | 671 #endif |
670 | 672 |
671 } // namespace chrome | 673 } // namespace chrome |
OLD | NEW |