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

Unified Diff: chrome/browser/chrome_browser_main.cc

Issue 10343007: Retrieving Chrome Variations seed from server and storing in local prefs. Loading seed data from lo… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing many nits Created 8 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: chrome/browser/chrome_browser_main.cc
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
index c2700d80a7cb856ac96f151458aa793117ecf0d7..ac19e902e886d6cb40c7aa58aeaab760b248dd58 100644
--- a/chrome/browser/chrome_browser_main.cc
+++ b/chrome/browser/chrome_browser_main.cc
@@ -56,6 +56,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"
@@ -561,7 +562,8 @@ ChromeBrowserMainParts::ChromeBrowserMainParts(
is_first_run_(false),
first_run_ui_bypass_(false),
local_state_(NULL),
- restart_last_session_(false) {
+ restart_last_session_(false),
+ variations_service_(NULL) {
Alexei Svitkine (slow) 2012/05/04 03:09:53 I don't think this line is needed at all - I belie
jwd 2012/05/04 19:33:06 Done.
// If we're running tests (ui_task is non-null).
if (parameters.ui_task)
browser_defaults::enable_help_app = false;
@@ -612,6 +614,9 @@ void ChromeBrowserMainParts::SetupMetricsAndFieldTrials() {
}
#endif // NDEBUG
+ variations_service_.reset(new VariationsService());
+ variations_service_->LoadVariationsSeed(browser_process_->local_state());
+
SetupFieldTrials(metrics->recording_active(),
local_state_->IsManagedPreference(
prefs::kMaxConnectionsPerProxy));
@@ -1874,6 +1879,9 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
}
#endif
+ // Request new variations seed information from server.
MAD 2012/05/04 12:29:57 If we keep this here, we need to keep it within th
MAD 2012/05/04 20:53:12 Ping?
jwd 2012/05/04 22:11:23 Done.
+ variations_service_->StartFetchingVariationsSeed();
+
run_message_loop_ = true;
} else {
run_message_loop_ = false;

Powered by Google App Engine
This is Rietveld 408576698