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

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: max retries in a const 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
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..1f88e6d5656cbb129dd8a6e9fbb11e885a725678 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,15 @@ 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) {
+ if (translate_manager_ != NULL) {
+ translate_manager_->FetchLanguageListFromTranslateServer(
+ profile_->GetPrefs());
+ // Request new variations seed information from server.
+ }
+ browser_process_->variations_service()->StartFetchingVariationsSeed();
Ilya Sherman 2012/05/15 22:11:17 nit: I think the nested if-stmts would be less sur
jwd 2012/05/16 14:47:31 Good idea. Done.
}
#endif

Powered by Google App Engine
This is Rietveld 408576698