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

Unified Diff: chrome/browser/net/chrome_network_delegate.cc

Issue 514353002: Check if precaching is allowed before reporting related metrics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/precache/content/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/chrome_network_delegate.cc
diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc
index d69e0eb1a4c4397d0fd21c01eb3284d807baaaf7..413033ba0e91195da63da70affd6e0b564995028 100644
--- a/chrome/browser/net/chrome_network_delegate.cc
+++ b/chrome/browser/net/chrome_network_delegate.cc
@@ -217,8 +217,8 @@ void RecordPrecacheStatsOnUIThread(const GURL& url,
precache::PrecacheManager* precache_manager =
precache::PrecacheManagerFactory::GetForBrowserContext(profile);
- if (!precache_manager) {
- // This could be NULL if the profile is off the record.
+ if (!precache_manager || !precache_manager->IsPrecachingAllowed()) {
+ // |precache_manager| could be NULL if the profile is off the record.
return;
}
« no previous file with comments | « no previous file | components/precache/content/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698