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

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

Issue 6708059: Turn on client-side phishing detection for UMA users with SafeBrowsing enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disable client-side phishing detection on ChromeOS Created 9 years, 8 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 | chrome/browser/renderer_host/browser_render_process_host.cc » ('j') | 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 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 917 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 safe_browsing_detection_service_.reset( 928 safe_browsing_detection_service_.reset(
929 safe_browsing::ClientSideDetectionService::Create( 929 safe_browsing::ClientSideDetectionService::Create(
930 model_file_path.Append(chrome::kSafeBrowsingPhishingModelFilename), 930 model_file_path.Append(chrome::kSafeBrowsingPhishingModelFilename),
931 profile->GetRequestContext())); 931 profile->GetRequestContext()));
932 } 932 }
933 } 933 }
934 934
935 bool BrowserProcessImpl::IsSafeBrowsingDetectionServiceEnabled() { 935 bool BrowserProcessImpl::IsSafeBrowsingDetectionServiceEnabled() {
936 // The safe browsing client-side detection is enabled only if the switch is 936 // The safe browsing client-side detection is enabled only if the switch is
937 // enabled and when safe browsing related stats is allowed to be collected. 937 // enabled and when safe browsing related stats is allowed to be collected.
938 return CommandLine::ForCurrentProcess()->HasSwitch( 938 #ifdef OS_CHROMEOS
939 switches::kEnableClientSidePhishingDetection) && 939 return false;
940 #else
941 return !CommandLine::ForCurrentProcess()->HasSwitch(
942 switches::kDisableClientSidePhishingDetection) &&
940 resource_dispatcher_host()->safe_browsing_service() && 943 resource_dispatcher_host()->safe_browsing_service() &&
941 resource_dispatcher_host()->safe_browsing_service()->CanReportStats(); 944 resource_dispatcher_host()->safe_browsing_service()->CanReportStats();
945 #endif
942 } 946 }
943 947
944 // The BrowserProcess object must outlive the file thread so we use traits 948 // The BrowserProcess object must outlive the file thread so we use traits
945 // which don't do any management. 949 // which don't do any management.
946 DISABLE_RUNNABLE_METHOD_REFCOUNT(BrowserProcessImpl); 950 DISABLE_RUNNABLE_METHOD_REFCOUNT(BrowserProcessImpl);
947 951
948 #if defined(IPC_MESSAGE_LOG_ENABLED) 952 #if defined(IPC_MESSAGE_LOG_ENABLED)
949 953
950 void BrowserProcessImpl::SetIPCLoggingEnabled(bool enable) { 954 void BrowserProcessImpl::SetIPCLoggingEnabled(bool enable) {
951 // First enable myself. 955 // First enable myself.
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
1033 } 1037 }
1034 1038
1035 void BrowserProcessImpl::OnAutoupdateTimer() { 1039 void BrowserProcessImpl::OnAutoupdateTimer() {
1036 if (CanAutorestartForUpdate()) { 1040 if (CanAutorestartForUpdate()) {
1037 DLOG(WARNING) << "Detected update. Restarting browser."; 1041 DLOG(WARNING) << "Detected update. Restarting browser.";
1038 RestartPersistentInstance(); 1042 RestartPersistentInstance();
1039 } 1043 }
1040 } 1044 }
1041 1045
1042 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1046 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/renderer_host/browser_render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698