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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 10392007: Restoring the chrome variatioons client, with a fix for browser_test failures caused by it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moved comment Created 8 years, 7 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 | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/metrics/proto/study.proto » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index 87d77dbe372f6ccd21b6de9447bf7c8dbab42897..d83ebd21c7e8f733f21a7549083a7b4faa096dcc 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -55,6 +55,7 @@
#include "chrome/browser/metrics/metrics_service.h"
#include "chrome/browser/metrics/thread_watcher.h"
#include "chrome/browser/metrics/tracking_synchronizer.h"
+#include "chrome/browser/metrics/variations_service.h"
#include "chrome/browser/nacl_host/nacl_process_host.h"
#include "chrome/browser/net/chrome_net_log.h"
#include "chrome/browser/net/predictor.h"
@@ -590,6 +591,10 @@ void ChromeBrowserMainParts::SetupMetricsAndFieldTrials() {
}
#endif // NDEBUG
+ VariationsService* variations_service =
+ browser_process_->variations_service();
+ variations_service->CreateTrialsFromSeed(browser_process_->local_state());
+
SetupFieldTrials(metrics->recording_active(),
local_state_->IsManagedPreference(
prefs::kMaxConnectionsPerProxy));
@@ -1861,10 +1866,16 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// http://crosbug.com/17687
#if !defined(OS_CHROMEOS)
// If we're running tests (ui_task is non-null), then we don't want to
- // call FetchLanguageListFromTranslateServer
- if (parameters().ui_task == NULL && translate_manager_ != NULL) {
- translate_manager_->FetchLanguageListFromTranslateServer(
- profile_->GetPrefs());
+ // call FetchLanguageListFromTranslateServer or
+ // StartFetchingVariationsSeed.
+ if (parameters().ui_task == NULL) {
+ // Request new variations seed information from server.
+ browser_process_->variations_service()->StartFetchingVariationsSeed();
+
+ if (translate_manager_ != NULL) {
+ translate_manager_->FetchLanguageListFromTranslateServer(
+ profile_->GetPrefs());
+ }
}
#endif
« no previous file with comments | « chrome/browser/browser_process_impl.cc ('k') | chrome/browser/metrics/proto/study.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698