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

Unified Diff: components/precache/content/precache_manager.cc

Issue 1864583006: Simplify BrowserContext by removing redundant methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 4 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 side-by-side diff with in-line comments
Download patch
Index: components/precache/content/precache_manager.cc
diff --git a/components/precache/content/precache_manager.cc b/components/precache/content/precache_manager.cc
index a815b16f583bcbe7f2ff7e438dca47a6b9294a20..1d2ddb653b7742cb2d7257d3ea1aeaa37f5aba25 100644
--- a/components/precache/content/precache_manager.cc
+++ b/components/precache/content/precache_manager.cc
@@ -23,6 +23,7 @@
#include "components/variations/variations_associated_data.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/storage_partition.h"
#include "net/base/network_change_notifier.h"
using content::BrowserThread;
@@ -279,13 +280,15 @@ void PrecacheManager::OnHostsReceived(
hosts.push_back(host_count.first);
// Start precaching.
- precache_fetcher_.reset(
- new PrecacheFetcher(hosts, browser_context_->GetRequestContext(),
- GURL(variations::GetVariationParamValue(
- kPrecacheFieldTrialName, kConfigURLParam)),
- variations::GetVariationParamValue(
- kPrecacheFieldTrialName, kManifestURLPrefixParam),
- this));
+ precache_fetcher_.reset(new PrecacheFetcher(
+ hosts,
+ content::BrowserContext::GetDefaultStoragePartition(browser_context_)->
+ GetURLRequestContext(),
+ GURL(variations::GetVariationParamValue(
+ kPrecacheFieldTrialName, kConfigURLParam)),
+ variations::GetVariationParamValue(
+ kPrecacheFieldTrialName, kManifestURLPrefixParam),
+ this));
precache_fetcher_->Start();
}
« no previous file with comments | « components/feedback/feedback_uploader_chrome_unittest.cc ('k') | components/precache/content/precache_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698