diff options
author | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-30 21:59:53 +0000 |
---|---|---|
committer | tony@chromium.org <tony@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-30 21:59:53 +0000 |
commit | 975bead0d4a441b838950e7ca1c0f1dff1cb22c8 (patch) | |
tree | 74551561a5c73f65655aba492a383ef0b923ac79 /chrome/browser/safe_browsing | |
parent | fc677875ab6319907a3fd5c1324c427a6b26e254 (diff) | |
download | chromium_src-975bead0d4a441b838950e7ca1c0f1dff1cb22c8.zip chromium_src-975bead0d4a441b838950e7ca1c0f1dff1cb22c8.tar.gz chromium_src-975bead0d4a441b838950e7ca1c0f1dff1cb22c8.tar.bz2 |
Remove another instance of using the transient pref service. This pref
is only read from the options dialog, the windows installer (a separate
process) and a spot in safe browsing. The only one that matters is
the safe browsing case.
BUG=28992
Review URL: http://codereview.chromium.org/456004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33348 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/safe_browsing')
-rw-r--r-- | chrome/browser/safe_browsing/safe_browsing_service.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc index 236791f..5b38aab 100644 --- a/chrome/browser/safe_browsing/safe_browsing_service.cc +++ b/chrome/browser/safe_browsing/safe_browsing_service.cc @@ -8,6 +8,7 @@ #include "base/path_service.h" #include "base/string_util.h" #include "chrome/browser/browser_process.h" +#include "chrome/browser/metrics/metrics_service.h" #include "chrome/browser/net/url_request_context_getter.h" #include "chrome/browser/profile_manager.h" #include "chrome/browser/safe_browsing/protocol_manager.h" @@ -696,9 +697,9 @@ void SafeBrowsingService::DoDisplayBlockingPage( // Report the malware sub-resource to the SafeBrowsing servers if we have a // malware sub-resource on a safe page and only if the user has opted in to // reporting statistics. - PrefService* prefs = g_browser_process->local_state(); - DCHECK(prefs); - if (prefs && prefs->GetBoolean(prefs::kMetricsReportingEnabled) && + const MetricsService* metrics = g_browser_process->metrics_service(); + DCHECK(metrics); + if (metrics && metrics->reporting_active() && resource.resource_type != ResourceType::MAIN_FRAME && resource.threat_type == SafeBrowsingService::URL_MALWARE) { GURL page_url = wc->GetURL(); |