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

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

Issue 1306653004: Expand FeatureList to support FieldTrial association. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 3 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 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 676 matching lines...) Expand 10 before | Expand all | Expand 10 after
687 } 687 }
688 688
689 scoped_ptr<base::FeatureList> feature_list(new base::FeatureList); 689 scoped_ptr<base::FeatureList> feature_list(new base::FeatureList);
690 feature_list->InitializeFromCommandLine( 690 feature_list->InitializeFromCommandLine(
691 command_line->GetSwitchValueASCII(switches::kEnableFeatures), 691 command_line->GetSwitchValueASCII(switches::kEnableFeatures),
692 command_line->GetSwitchValueASCII(switches::kDisableFeatures)); 692 command_line->GetSwitchValueASCII(switches::kDisableFeatures));
693 693
694 variations::VariationsService* variations_service = 694 variations::VariationsService* variations_service =
695 browser_process_->variations_service(); 695 browser_process_->variations_service();
696 if (variations_service) 696 if (variations_service)
697 variations_service->CreateTrialsFromSeed(); 697 variations_service->CreateTrialsFromSeed(feature_list.get());
698 698
699 // TODO(asvitkine): Pass |feature_list| to CreateTrialsFromSeed() above.
700 base::FeatureList::SetInstance(feature_list.Pass()); 699 base::FeatureList::SetInstance(feature_list.Pass());
701 700
702 // This must be called after |local_state_| is initialized. 701 // This must be called after |local_state_| is initialized.
703 browser_field_trials_.SetupFieldTrials(); 702 browser_field_trials_.SetupFieldTrials();
704 703
705 // Enable Navigation Tracing only if a trace upload url is specified. 704 // Enable Navigation Tracing only if a trace upload url is specified.
706 if (command_line->HasSwitch(switches::kEnableNavigationTracing) && 705 if (command_line->HasSwitch(switches::kEnableNavigationTracing) &&
707 command_line->HasSwitch(switches::kTraceUploadURL)) { 706 command_line->HasSwitch(switches::kTraceUploadURL)) {
708 tracing::SetupNavigationTracing(); 707 tracing::SetupNavigationTracing();
709 } 708 }
(...skipping 1138 matching lines...) Expand 10 before | Expand all | Expand 10 after
1848 chromeos::CrosSettings::Shutdown(); 1847 chromeos::CrosSettings::Shutdown();
1849 #endif // defined(OS_CHROMEOS) 1848 #endif // defined(OS_CHROMEOS)
1850 #endif // defined(OS_ANDROID) 1849 #endif // defined(OS_ANDROID)
1851 } 1850 }
1852 1851
1853 // Public members: 1852 // Public members:
1854 1853
1855 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1854 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1856 chrome_extra_parts_.push_back(parts); 1855 chrome_extra_parts_.push_back(parts);
1857 } 1856 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698