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

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 688973004: Plumbing for variations headers from synthetic field trials. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Expose another hashed API in variations_associated_data.h Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 } 614 }
615 if (command_line->HasSwitch(switches::kForceVariationIds)) { 615 if (command_line->HasSwitch(switches::kForceVariationIds)) {
616 // Create default variation ids which will always be included in the 616 // Create default variation ids which will always be included in the
617 // X-Client-Data request header. 617 // X-Client-Data request header.
618 variations::VariationsHttpHeaderProvider* provider = 618 variations::VariationsHttpHeaderProvider* provider =
619 variations::VariationsHttpHeaderProvider::GetInstance(); 619 variations::VariationsHttpHeaderProvider::GetInstance();
620 bool result = provider->SetDefaultVariationIds( 620 bool result = provider->SetDefaultVariationIds(
621 command_line->GetSwitchValueASCII(switches::kForceVariationIds)); 621 command_line->GetSwitchValueASCII(switches::kForceVariationIds));
622 CHECK(result) << "Invalid --" << switches::kForceVariationIds 622 CHECK(result) << "Invalid --" << switches::kForceVariationIds
623 << " list specified."; 623 << " list specified.";
624 metrics->AddSyntheticTrialObserver(provider);
624 } 625 }
625 chrome_variations::VariationsService* variations_service = 626 chrome_variations::VariationsService* variations_service =
626 browser_process_->variations_service(); 627 browser_process_->variations_service();
627 if (variations_service) 628 if (variations_service)
628 variations_service->CreateTrialsFromSeed(); 629 variations_service->CreateTrialsFromSeed();
629 630
630 // This must be called after |local_state_| is initialized. 631 // This must be called after |local_state_| is initialized.
631 browser_field_trials_.SetupFieldTrials( 632 browser_field_trials_.SetupFieldTrials(
632 base::Time::FromTimeT(metrics->GetInstallDate()), local_state_); 633 base::Time::FromTimeT(metrics->GetInstallDate()), local_state_);
633 634
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after
1683 chromeos::CrosSettings::Shutdown(); 1684 chromeos::CrosSettings::Shutdown();
1684 #endif 1685 #endif
1685 #endif 1686 #endif
1686 } 1687 }
1687 1688
1688 // Public members: 1689 // Public members:
1689 1690
1690 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1691 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1691 chrome_extra_parts_.push_back(parts); 1692 chrome_extra_parts_.push_back(parts);
1692 } 1693 }
OLDNEW
« no previous file with comments | « no previous file | components/metrics/metrics_service.h » ('j') | components/variations/net/variations_http_header_provider.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698