| 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 #include "components/rappor/rappor_service.h" | 119 #include "components/rappor/rappor_service.h" |
| 120 #include "components/signin/core/common/profile_management_switches.h" | 120 #include "components/signin/core/common/profile_management_switches.h" |
| 121 #include "components/startup_metric_utils/startup_metric_utils.h" | 121 #include "components/startup_metric_utils/startup_metric_utils.h" |
| 122 #include "components/tracing/tracing_switches.h" | 122 #include "components/tracing/tracing_switches.h" |
| 123 #include "components/translate/content/browser/browser_cld_utils.h" | 123 #include "components/translate/content/browser/browser_cld_utils.h" |
| 124 #include "components/translate/content/common/cld_data_source.h" | 124 #include "components/translate/content/common/cld_data_source.h" |
| 125 #include "components/translate/core/browser/translate_download_manager.h" | 125 #include "components/translate/core/browser/translate_download_manager.h" |
| 126 #include "components/variations/net/variations_http_header_provider.h" | 126 #include "components/variations/net/variations_http_header_provider.h" |
| 127 #include "components/variations/pref_names.h" | 127 #include "components/variations/pref_names.h" |
| 128 #include "components/variations/variations_associated_data.h" | 128 #include "components/variations/variations_associated_data.h" |
| 129 #include "components/variations/variations_switches.h" |
| 129 #include "components/version_info/version_info.h" | 130 #include "components/version_info/version_info.h" |
| 130 #include "content/public/browser/browser_thread.h" | 131 #include "content/public/browser/browser_thread.h" |
| 131 #include "content/public/browser/notification_observer.h" | 132 #include "content/public/browser/notification_observer.h" |
| 132 #include "content/public/browser/notification_registrar.h" | 133 #include "content/public/browser/notification_registrar.h" |
| 133 #include "content/public/browser/notification_service.h" | 134 #include "content/public/browser/notification_service.h" |
| 134 #include "content/public/browser/notification_types.h" | 135 #include "content/public/browser/notification_types.h" |
| 135 #include "content/public/browser/power_usage_monitor.h" | 136 #include "content/public/browser/power_usage_monitor.h" |
| 136 #include "content/public/browser/site_instance.h" | 137 #include "content/public/browser/site_instance.h" |
| 137 #include "content/public/common/content_client.h" | 138 #include "content/public/common/content_client.h" |
| 138 #include "content/public/common/content_switches.h" | 139 #include "content/public/common/content_switches.h" |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 command_line->GetSwitchValueASCII(switches::kForceFieldTrials), | 656 command_line->GetSwitchValueASCII(switches::kForceFieldTrials), |
| 656 base::FieldTrialList::DONT_ACTIVATE_TRIALS, | 657 base::FieldTrialList::DONT_ACTIVATE_TRIALS, |
| 657 unforceable_field_trials); | 658 unforceable_field_trials); |
| 658 CHECK(result) << "Invalid --" << switches::kForceFieldTrials | 659 CHECK(result) << "Invalid --" << switches::kForceFieldTrials |
| 659 << " list specified."; | 660 << " list specified."; |
| 660 } | 661 } |
| 661 | 662 |
| 662 #if defined(FIELDTRIAL_TESTING_ENABLED) | 663 #if defined(FIELDTRIAL_TESTING_ENABLED) |
| 663 if (!command_line->HasSwitch(switches::kDisableFieldTrialTestingConfig) && | 664 if (!command_line->HasSwitch(switches::kDisableFieldTrialTestingConfig) && |
| 664 !command_line->HasSwitch(switches::kForceFieldTrials) && | 665 !command_line->HasSwitch(switches::kForceFieldTrials) && |
| 665 !command_line->HasSwitch(switches::kVariationsServerURL)) | 666 !command_line->HasSwitch( |
| 667 chrome_variations::switches::kVariationsServerURL)) |
| 666 chrome_variations::AssociateDefaultFieldTrialConfig(); | 668 chrome_variations::AssociateDefaultFieldTrialConfig(); |
| 667 #endif // defined(FIELDTRIAL_TESTING_ENABLED) | 669 #endif // defined(FIELDTRIAL_TESTING_ENABLED) |
| 668 | 670 |
| 669 if (command_line->HasSwitch(switches::kForceVariationIds)) { | 671 if (command_line->HasSwitch(switches::kForceVariationIds)) { |
| 670 // Create default variation ids which will always be included in the | 672 // Create default variation ids which will always be included in the |
| 671 // X-Client-Data request header. | 673 // X-Client-Data request header. |
| 672 variations::VariationsHttpHeaderProvider* provider = | 674 variations::VariationsHttpHeaderProvider* provider = |
| 673 variations::VariationsHttpHeaderProvider::GetInstance(); | 675 variations::VariationsHttpHeaderProvider::GetInstance(); |
| 674 bool result = provider->SetDefaultVariationIds( | 676 bool result = provider->SetDefaultVariationIds( |
| 675 command_line->GetSwitchValueASCII(switches::kForceVariationIds)); | 677 command_line->GetSwitchValueASCII(switches::kForceVariationIds)); |
| (...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1811 chromeos::CrosSettings::Shutdown(); | 1813 chromeos::CrosSettings::Shutdown(); |
| 1812 #endif // defined(OS_CHROMEOS) | 1814 #endif // defined(OS_CHROMEOS) |
| 1813 #endif // defined(OS_ANDROID) | 1815 #endif // defined(OS_ANDROID) |
| 1814 } | 1816 } |
| 1815 | 1817 |
| 1816 // Public members: | 1818 // Public members: |
| 1817 | 1819 |
| 1818 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1820 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
| 1819 chrome_extra_parts_.push_back(parts); | 1821 chrome_extra_parts_.push_back(parts); |
| 1820 } | 1822 } |
| OLD | NEW |