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

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

Issue 7134017: Make safe browsing work in a multi-profile environment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: final tweaks Created 9 years, 5 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 | Annotate | Revision Log
OLDNEW
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
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->HasPrefPath(prefs::kSafeBrowsingEnabled) ||
255 !prefs->GetBoolean(prefs::kSafeBrowsingEnabled) ||
256 !g_browser_process->safe_browsing_detection_service()) {
255 command_line->AppendSwitch(switches::kDisableClientSidePhishingDetection); 257 command_line->AppendSwitch(switches::kDisableClientSidePhishingDetection);
258 }
256 259
257 static const char* const kSwitchNames[] = { 260 static const char* const kSwitchNames[] = {
258 switches::kAllowHTTPBackgroundPage, 261 switches::kAllowHTTPBackgroundPage,
259 switches::kAllowScriptingGallery, 262 switches::kAllowScriptingGallery,
260 switches::kAppsCheckoutURL, 263 switches::kAppsCheckoutURL,
261 switches::kAppsGalleryURL, 264 switches::kAppsGalleryURL,
262 switches::kDebugPrint, 265 switches::kDebugPrint,
263 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS) && !defined(OS_MACOSX) 266 #if defined(GOOGLE_CHROME_BUILD) && !defined(OS_CHROMEOS) && !defined(OS_MACOSX)
264 // Enabled by default in Google Chrome builds, except on CrOS. 267 // Enabled by default in Google Chrome builds, except on CrOS.
265 switches::kDisablePrintPreview, 268 switches::kDisablePrintPreview,
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
630 #if defined(USE_NSS) 633 #if defined(USE_NSS)
631 crypto::CryptoModuleBlockingPasswordDelegate* 634 crypto::CryptoModuleBlockingPasswordDelegate*
632 ChromeContentBrowserClient::GetCryptoPasswordDelegate( 635 ChromeContentBrowserClient::GetCryptoPasswordDelegate(
633 const GURL& url) { 636 const GURL& url) {
634 return browser::NewCryptoModuleBlockingDialogDelegate( 637 return browser::NewCryptoModuleBlockingDialogDelegate(
635 browser::kCryptoModulePasswordKeygen, url.host()); 638 browser::kCryptoModulePasswordKeygen, url.host());
636 } 639 }
637 #endif 640 #endif
638 641
639 } // namespace chrome 642 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698