OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser_main.h" | 5 #include "chrome/browser/browser_main.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 #include "chrome/browser/browser_process_impl.h" | 37 #include "chrome/browser/browser_process_impl.h" |
38 #include "chrome/browser/browser_shutdown.h" | 38 #include "chrome/browser/browser_shutdown.h" |
39 #include "chrome/browser/chrome_content_browser_client.h" | 39 #include "chrome/browser/chrome_content_browser_client.h" |
40 #include "chrome/browser/defaults.h" | 40 #include "chrome/browser/defaults.h" |
41 #include "chrome/browser/extensions/extension_protocols.h" | 41 #include "chrome/browser/extensions/extension_protocols.h" |
42 #include "chrome/browser/extensions/extension_service.h" | 42 #include "chrome/browser/extensions/extension_service.h" |
43 #include "chrome/browser/extensions/extensions_startup.h" | 43 #include "chrome/browser/extensions/extensions_startup.h" |
44 #include "chrome/browser/first_run/first_run.h" | 44 #include "chrome/browser/first_run/first_run.h" |
45 #include "chrome/browser/first_run/first_run_browser_process.h" | 45 #include "chrome/browser/first_run/first_run_browser_process.h" |
46 #include "chrome/browser/first_run/upgrade_util.h" | 46 #include "chrome/browser/first_run/upgrade_util.h" |
| 47 #include "chrome/browser/instant/instant_field_trial.h" |
47 #include "chrome/browser/jankometer.h" | 48 #include "chrome/browser/jankometer.h" |
48 #include "chrome/browser/metrics/field_trial_synchronizer.h" | 49 #include "chrome/browser/metrics/field_trial_synchronizer.h" |
49 #include "chrome/browser/metrics/histogram_synchronizer.h" | 50 #include "chrome/browser/metrics/histogram_synchronizer.h" |
50 #include "chrome/browser/metrics/metrics_log.h" | 51 #include "chrome/browser/metrics/metrics_log.h" |
51 #include "chrome/browser/metrics/metrics_service.h" | 52 #include "chrome/browser/metrics/metrics_service.h" |
52 #include "chrome/browser/metrics/thread_watcher.h" | 53 #include "chrome/browser/metrics/thread_watcher.h" |
53 #include "chrome/browser/net/chrome_dns_cert_provenance_checker.h" | 54 #include "chrome/browser/net/chrome_dns_cert_provenance_checker.h" |
54 #include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.h" | 55 #include "chrome/browser/net/chrome_dns_cert_provenance_checker_factory.h" |
55 #include "chrome/browser/net/chrome_net_log.h" | 56 #include "chrome/browser/net/chrome_net_log.h" |
56 #include "chrome/browser/net/predictor_api.h" | 57 #include "chrome/browser/net/predictor_api.h" |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 ConnectionFieldTrial(); | 638 ConnectionFieldTrial(); |
638 SocketTimeoutFieldTrial(); | 639 SocketTimeoutFieldTrial(); |
639 // If a policy is defining the number of active connections this field test | 640 // If a policy is defining the number of active connections this field test |
640 // shoud not be performed. | 641 // shoud not be performed. |
641 if (!proxy_policy_is_set) | 642 if (!proxy_policy_is_set) |
642 ProxyConnectionsFieldTrial(); | 643 ProxyConnectionsFieldTrial(); |
643 prerender::ConfigurePrefetchAndPrerender(parsed_command_line()); | 644 prerender::ConfigurePrefetchAndPrerender(parsed_command_line()); |
644 SpdyFieldTrial(); | 645 SpdyFieldTrial(); |
645 ConnectBackupJobsFieldTrial(); | 646 ConnectBackupJobsFieldTrial(); |
646 WarmConnectionFieldTrial(); | 647 WarmConnectionFieldTrial(); |
| 648 instant_field_trial::Init(); |
647 } | 649 } |
648 | 650 |
649 // ----------------------------------------------------------------------------- | 651 // ----------------------------------------------------------------------------- |
650 // TODO(viettrungluu): move more/rest of BrowserMain() into above structure | 652 // TODO(viettrungluu): move more/rest of BrowserMain() into above structure |
651 | 653 |
652 namespace { | 654 namespace { |
653 | 655 |
654 // This function provides some ways to test crash and assertion handling | 656 // This function provides some ways to test crash and assertion handling |
655 // behavior of the program. | 657 // behavior of the program. |
656 void HandleTestParameters(const CommandLine& command_line) { | 658 void HandleTestParameters(const CommandLine& command_line) { |
(...skipping 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2077 #if defined(OS_CHROMEOS) | 2079 #if defined(OS_CHROMEOS) |
2078 // To be precise, logout (browser shutdown) is not yet done, but the | 2080 // To be precise, logout (browser shutdown) is not yet done, but the |
2079 // remaining work is negligible, hence we say LogoutDone here. | 2081 // remaining work is negligible, hence we say LogoutDone here. |
2080 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 2082 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
2081 false); | 2083 false); |
2082 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 2084 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
2083 #endif | 2085 #endif |
2084 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); | 2086 TRACE_EVENT_END_ETW("BrowserMain", 0, 0); |
2085 return result_code; | 2087 return result_code; |
2086 } | 2088 } |
OLD | NEW |