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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 #include "net/base/net_module.h" | 142 #include "net/base/net_module.h" |
143 #include "net/cookies/cookie_monster.h" | 143 #include "net/cookies/cookie_monster.h" |
144 #include "net/http/http_network_layer.h" | 144 #include "net/http/http_network_layer.h" |
145 #include "net/http/http_stream_factory.h" | 145 #include "net/http/http_stream_factory.h" |
146 #include "net/url_request/url_request.h" | 146 #include "net/url_request/url_request.h" |
147 #include "ui/base/l10n/l10n_util.h" | 147 #include "ui/base/l10n/l10n_util.h" |
148 #include "ui/base/layout.h" | 148 #include "ui/base/layout.h" |
149 #include "ui/base/resource/resource_bundle.h" | 149 #include "ui/base/resource/resource_bundle.h" |
150 #include "ui/strings/grit/app_locale_settings.h" | 150 #include "ui/strings/grit/app_locale_settings.h" |
151 | 151 |
| 152 #if OFFICIAL_BUILD |
| 153 #undef FIELDTRIAL_TESTING_IS_OFFICIAL_BUILD |
| 154 #define FIELDTRIAL_TESTING_IS_OFFICIAL_BUILD 1 |
| 155 #elif !defined(FIELDTRIAL_TESTING_IS_OFFICIAL_BUILD) |
| 156 #define FIELDTRIAL_TESTING_IS_OFFICIAL_BUILD 0 |
| 157 #endif |
| 158 |
152 #if defined(OS_ANDROID) | 159 #if defined(OS_ANDROID) |
153 #include "chrome/browser/android/dev_tools_discovery_provider_android.h" | 160 #include "chrome/browser/android/dev_tools_discovery_provider_android.h" |
154 #include "chrome/browser/metrics/thread_watcher_android.h" | 161 #include "chrome/browser/metrics/thread_watcher_android.h" |
155 #include "ui/base/resource/resource_bundle_android.h" | 162 #include "ui/base/resource/resource_bundle_android.h" |
156 #else | 163 #else |
157 #include "chrome/browser/devtools/chrome_devtools_discovery_provider.h" | 164 #include "chrome/browser/devtools/chrome_devtools_discovery_provider.h" |
158 #include "chrome/browser/feedback/feedback_profile_observer.h" | 165 #include "chrome/browser/feedback/feedback_profile_observer.h" |
159 #endif // defined(OS_ANDROID) | 166 #endif // defined(OS_ANDROID) |
160 | 167 |
161 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 168 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 // Create field trials without activating them, so that this behaves in a | 635 // Create field trials without activating them, so that this behaves in a |
629 // consistent manner with field trials created from the server. | 636 // consistent manner with field trials created from the server. |
630 bool result = base::FieldTrialList::CreateTrialsFromString( | 637 bool result = base::FieldTrialList::CreateTrialsFromString( |
631 command_line->GetSwitchValueASCII(switches::kForceFieldTrials), | 638 command_line->GetSwitchValueASCII(switches::kForceFieldTrials), |
632 base::FieldTrialList::DONT_ACTIVATE_TRIALS, | 639 base::FieldTrialList::DONT_ACTIVATE_TRIALS, |
633 unforceable_field_trials); | 640 unforceable_field_trials); |
634 CHECK(result) << "Invalid --" << switches::kForceFieldTrials | 641 CHECK(result) << "Invalid --" << switches::kForceFieldTrials |
635 << " list specified."; | 642 << " list specified."; |
636 } | 643 } |
637 | 644 |
638 #if !defined(GOOGLE_CHROME_BUILD) | 645 #if !FIELDTRIAL_TESTING_IS_OFFICIAL_BUILD |
639 if (!command_line->HasSwitch(switches::kDisableFieldTrialTestingConfig) && | 646 if (!command_line->HasSwitch(switches::kDisableFieldTrialTestingConfig) && |
640 !command_line->HasSwitch(switches::kForceFieldTrials) && | 647 !command_line->HasSwitch(switches::kForceFieldTrials) && |
641 !command_line->HasSwitch(switches::kVariationsServerURL)) | 648 !command_line->HasSwitch(switches::kVariationsServerURL)) |
642 chrome_variations::AssociateDefaultFieldTrialConfig(); | 649 chrome_variations::AssociateDefaultFieldTrialConfig(); |
643 #endif // !defined(GOOGLE_CHROME_BUILD) | 650 #endif // !FIELDTRIAL_TESTING_IS_OFFICIAL_BUILD |
644 | 651 |
645 if (command_line->HasSwitch(switches::kForceVariationIds)) { | 652 if (command_line->HasSwitch(switches::kForceVariationIds)) { |
646 // Create default variation ids which will always be included in the | 653 // Create default variation ids which will always be included in the |
647 // X-Client-Data request header. | 654 // X-Client-Data request header. |
648 variations::VariationsHttpHeaderProvider* provider = | 655 variations::VariationsHttpHeaderProvider* provider = |
649 variations::VariationsHttpHeaderProvider::GetInstance(); | 656 variations::VariationsHttpHeaderProvider::GetInstance(); |
650 bool result = provider->SetDefaultVariationIds( | 657 bool result = provider->SetDefaultVariationIds( |
651 command_line->GetSwitchValueASCII(switches::kForceVariationIds)); | 658 command_line->GetSwitchValueASCII(switches::kForceVariationIds)); |
652 CHECK(result) << "Invalid --" << switches::kForceVariationIds | 659 CHECK(result) << "Invalid --" << switches::kForceVariationIds |
653 << " list specified."; | 660 << " list specified."; |
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1800 chromeos::CrosSettings::Shutdown(); | 1807 chromeos::CrosSettings::Shutdown(); |
1801 #endif // defined(OS_CHROMEOS) | 1808 #endif // defined(OS_CHROMEOS) |
1802 #endif // defined(OS_ANDROID) | 1809 #endif // defined(OS_ANDROID) |
1803 } | 1810 } |
1804 | 1811 |
1805 // Public members: | 1812 // Public members: |
1806 | 1813 |
1807 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { | 1814 void ChromeBrowserMainParts::AddParts(ChromeBrowserMainExtraParts* parts) { |
1808 chrome_extra_parts_.push_back(parts); | 1815 chrome_extra_parts_.push_back(parts); |
1809 } | 1816 } |
OLD | NEW |