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

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

Issue 6992045: Also enable client-side phishing detection for multi-user installs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 9 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 999 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 // For now we only enable client-side detection on the canary, dev and beta 1010 // For now we only enable client-side detection on the canary, dev and beta
1011 // channel. 1011 // channel.
1012 #ifdef OS_CHROMEOS 1012 #ifdef OS_CHROMEOS
1013 return false; 1013 return false;
1014 #else 1014 #else
1015 std::string channel = platform_util::GetVersionStringModifier(); 1015 std::string channel = platform_util::GetVersionStringModifier();
1016 return !CommandLine::ForCurrentProcess()->HasSwitch( 1016 return !CommandLine::ForCurrentProcess()->HasSwitch(
1017 switches::kDisableClientSidePhishingDetection) && 1017 switches::kDisableClientSidePhishingDetection) &&
1018 resource_dispatcher_host()->safe_browsing_service() && 1018 resource_dispatcher_host()->safe_browsing_service() &&
1019 resource_dispatcher_host()->safe_browsing_service()->CanReportStats() && 1019 resource_dispatcher_host()->safe_browsing_service()->CanReportStats() &&
1020 (channel == "beta" || channel == "dev" || channel == "canary"); 1020 // TODO(noelutz): use platform_util::GetChannel() once it has been
1021 // pushed to the release branch.
1022 (channel == "beta" || channel == "dev" || channel == "canary" ||
1023 channel == "beta-m" || channel == "dev-m" || channel == "canary-m");
1024
1021 #endif 1025 #endif
1022 } 1026 }
1023 1027
1024 void BrowserProcessImpl::ApplyDisabledSchemesPolicy() { 1028 void BrowserProcessImpl::ApplyDisabledSchemesPolicy() {
1025 std::set<std::string> schemes; 1029 std::set<std::string> schemes;
1026 const ListValue* scheme_list = local_state_->GetList(prefs::kDisabledSchemes); 1030 const ListValue* scheme_list = local_state_->GetList(prefs::kDisabledSchemes);
1027 for (ListValue::const_iterator iter = scheme_list->begin(); 1031 for (ListValue::const_iterator iter = scheme_list->begin();
1028 iter != scheme_list->end(); ++iter) { 1032 iter != scheme_list->end(); ++iter) {
1029 std::string scheme; 1033 std::string scheme;
1030 if ((*iter)->GetAsString(&scheme)) 1034 if ((*iter)->GetAsString(&scheme))
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
1125 } 1129 }
1126 1130
1127 void BrowserProcessImpl::OnAutoupdateTimer() { 1131 void BrowserProcessImpl::OnAutoupdateTimer() {
1128 if (CanAutorestartForUpdate()) { 1132 if (CanAutorestartForUpdate()) {
1129 DLOG(WARNING) << "Detected update. Restarting browser."; 1133 DLOG(WARNING) << "Detected update. Restarting browser.";
1130 RestartPersistentInstance(); 1134 RestartPersistentInstance();
1131 } 1135 }
1132 } 1136 }
1133 1137
1134 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1138 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698