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

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: Address Rob's comments. 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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 } 673 }
674 674
675 scoped_ptr<base::FeatureList> feature_list(new base::FeatureList); 675 scoped_ptr<base::FeatureList> feature_list(new base::FeatureList);
676 feature_list->InitializeFromCommandLine( 676 feature_list->InitializeFromCommandLine(
677 command_line->GetSwitchValueASCII(switches::kEnableFeatures), 677 command_line->GetSwitchValueASCII(switches::kEnableFeatures),
678 command_line->GetSwitchValueASCII(switches::kDisableFeatures)); 678 command_line->GetSwitchValueASCII(switches::kDisableFeatures));
679 679
680 variations::VariationsService* variations_service = 680 variations::VariationsService* variations_service =
681 browser_process_->variations_service(); 681 browser_process_->variations_service();
682 if (variations_service) 682 if (variations_service)
683 variations_service->CreateTrialsFromSeed(); 683 variations_service->CreateTrialsFromSeed(feature_list.get());
684 684
685 // TODO(asvitkine): Pass |feature_list| to CreateTrialsFromSeed() above.
686 base::FeatureList::SetInstance(feature_list.Pass()); 685 base::FeatureList::SetInstance(feature_list.Pass());
687 686
688 // This must be called after |local_state_| is initialized. 687 // This must be called after |local_state_| is initialized.
689 browser_field_trials_.SetupFieldTrials(); 688 browser_field_trials_.SetupFieldTrials();
690 689
691 // Enable Navigation Tracing only if a trace upload url is specified. 690 // Enable Navigation Tracing only if a trace upload url is specified.
692 if (command_line->HasSwitch(switches::kEnableNavigationTracing) && 691 if (command_line->HasSwitch(switches::kEnableNavigationTracing) &&
693 command_line->HasSwitch(switches::kTraceUploadURL)) { 692 command_line->HasSwitch(switches::kTraceUploadURL)) {
694 tracing::SetupNavigationTracing(); 693 tracing::SetupNavigationTracing();
695 } 694 }
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1838 chromeos::CrosSettings::Shutdown(); 1837 chromeos::CrosSettings::Shutdown();
1839 #endif // defined(OS_CHROMEOS) 1838 #endif // defined(OS_CHROMEOS)
1840 #endif // defined(OS_ANDROID) 1839 #endif // defined(OS_ANDROID)
1841 } 1840 }
1842 1841
1843 // Public members: 1842 // Public members:
1844 1843
1845 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { 1844 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) {
1846 chrome_extra_parts_.push_back(parts); 1845 chrome_extra_parts_.push_back(parts);
1847 } 1846 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698