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

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

Issue 2037523002: Select precache resources based on field trial experiment group (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments, added more test Created 4 years, 6 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/core/precache_fetcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/precache/content/precache_manager.cc
diff --git a/components/precache/content/precache_manager.cc b/components/precache/content/precache_manager.cc
index dbeedde008050f3d6e42238a417f3836f5413aac..376c4579618c38b8059476dc98f87ce3fcc00689 100644
--- a/components/precache/content/precache_manager.cc
+++ b/components/precache/content/precache_manager.cc
@@ -20,6 +20,7 @@
#include "components/precache/core/proto/unfinished_work.pb.h"
#include "components/prefs/pref_service.h"
#include "components/sync_driver/sync_service.h"
+#include "components/variations/metrics_util.h"
#include "components/variations/variations_associated_data.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
@@ -315,13 +316,15 @@ void PrecacheManager::InitializeAndStartFetcher() {
}
// Start precaching.
precache_fetcher_.reset(new PrecacheFetcher(
- content::BrowserContext::GetDefaultStoragePartition(browser_context_)->
- GetURLRequestContext(),
- GURL(variations::GetVariationParamValue(
- kPrecacheFieldTrialName, kConfigURLParam)),
- variations::GetVariationParamValue(
- kPrecacheFieldTrialName, kManifestURLPrefixParam),
+ content::BrowserContext::GetDefaultStoragePartition(browser_context_)
+ ->GetURLRequestContext(),
+ GURL(variations::GetVariationParamValue(kPrecacheFieldTrialName,
+ kConfigURLParam)),
+ variations::GetVariationParamValue(kPrecacheFieldTrialName,
+ kManifestURLPrefixParam),
std::move(unfinished_work_),
+ metrics::HashName(
+ base::FieldTrialList::FindFullName(kPrecacheFieldTrialName)),
this));
precache_fetcher_->Start();
}
« no previous file with comments | « no previous file | components/precache/core/precache_fetcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698