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

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

Issue 7635010: Add support for client-side phishing detection for non-UMA users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 9 years, 4 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/browser_process_impl.h" 5 #include "chrome/browser/browser_process_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 } 996 }
997 997
998 bool BrowserProcessImpl::IsSafeBrowsingDetectionServiceEnabled() { 998 bool BrowserProcessImpl::IsSafeBrowsingDetectionServiceEnabled() {
999 // The safe browsing client-side detection is enabled only if the switch is 999 // The safe browsing client-side detection is enabled only if the switch is
1000 // not disabled and when safe browsing related stats are allowed to be 1000 // not disabled and when safe browsing related stats are allowed to be
1001 // collected. 1001 // collected.
1002 #if defined(ENABLE_SAFE_BROWSING) && !defined(OS_CHROMEOS) 1002 #if defined(ENABLE_SAFE_BROWSING) && !defined(OS_CHROMEOS)
1003 return !CommandLine::ForCurrentProcess()->HasSwitch( 1003 return !CommandLine::ForCurrentProcess()->HasSwitch(
1004 switches::kDisableClientSidePhishingDetection) && 1004 switches::kDisableClientSidePhishingDetection) &&
1005 safe_browsing_service() && 1005 safe_browsing_service() &&
1006 safe_browsing_service()->CanReportStats(); 1006 (CommandLine::ForCurrentProcess()->HasSwitch(
1007 switches::kEnableSanitizedClientSidePhishingDetection) ||
1008 safe_browsing_service()->CanReportStats());
1007 #else 1009 #else
1008 return false; 1010 return false;
1009 #endif 1011 #endif
1010 } 1012 }
1011 1013
1012 void BrowserProcessImpl::ApplyDisabledSchemesPolicy() { 1014 void BrowserProcessImpl::ApplyDisabledSchemesPolicy() {
1013 std::set<std::string> schemes; 1015 std::set<std::string> schemes;
1014 const ListValue* scheme_list = local_state_->GetList(prefs::kDisabledSchemes); 1016 const ListValue* scheme_list = local_state_->GetList(prefs::kDisabledSchemes);
1015 for (ListValue::const_iterator iter = scheme_list->begin(); 1017 for (ListValue::const_iterator iter = scheme_list->begin();
1016 iter != scheme_list->end(); ++iter) { 1018 iter != scheme_list->end(); ++iter) {
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1118 } 1120 }
1119 1121
1120 void BrowserProcessImpl::OnAutoupdateTimer() { 1122 void BrowserProcessImpl::OnAutoupdateTimer() {
1121 if (CanAutorestartForUpdate()) { 1123 if (CanAutorestartForUpdate()) {
1122 DLOG(WARNING) << "Detected update. Restarting browser."; 1124 DLOG(WARNING) << "Detected update. Restarting browser.";
1123 RestartPersistentInstance(); 1125 RestartPersistentInstance();
1124 } 1126 }
1125 } 1127 }
1126 1128
1127 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1129 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698