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