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 18 matching lines...) Expand all Loading... |
29 #include "base/utf_string_conversions.h" | 29 #include "base/utf_string_conversions.h" |
30 #include "base/values.h" | 30 #include "base/values.h" |
31 #include "build/build_config.h" | 31 #include "build/build_config.h" |
32 #include "chrome/browser/about_flags.h" | 32 #include "chrome/browser/about_flags.h" |
33 #include "chrome/browser/browser_main_win.h" | 33 #include "chrome/browser/browser_main_win.h" |
34 #include "chrome/browser/defaults.h" | 34 #include "chrome/browser/defaults.h" |
35 #include "chrome/browser/browser_process.h" | 35 #include "chrome/browser/browser_process.h" |
36 #include "chrome/browser/browser_process_impl.h" | 36 #include "chrome/browser/browser_process_impl.h" |
37 #include "chrome/browser/browser_shutdown.h" | 37 #include "chrome/browser/browser_shutdown.h" |
38 #include "chrome/browser/browser_thread.h" | 38 #include "chrome/browser/browser_thread.h" |
39 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" | 39 #include "chrome/browser/dom_ui/chrome_url_data_manager_backend.h" |
40 #include "chrome/browser/extensions/extension_protocols.h" | 40 #include "chrome/browser/extensions/extension_protocols.h" |
41 #include "chrome/browser/extensions/extension_service.h" | 41 #include "chrome/browser/extensions/extension_service.h" |
42 #include "chrome/browser/extensions/extensions_startup.h" | 42 #include "chrome/browser/extensions/extensions_startup.h" |
43 #include "chrome/browser/first_run/first_run.h" | 43 #include "chrome/browser/first_run/first_run.h" |
44 #include "chrome/browser/jankometer.h" | 44 #include "chrome/browser/jankometer.h" |
45 #include "chrome/browser/metrics/histogram_synchronizer.h" | 45 #include "chrome/browser/metrics/histogram_synchronizer.h" |
46 #include "chrome/browser/metrics/metrics_log.h" | 46 #include "chrome/browser/metrics/metrics_log.h" |
47 #include "chrome/browser/metrics/metrics_service.h" | 47 #include "chrome/browser/metrics/metrics_service.h" |
48 #include "chrome/browser/net/blob_url_request_job_factory.h" | 48 #include "chrome/browser/net/blob_url_request_job_factory.h" |
49 #include "chrome/browser/net/chrome_dns_cert_provenance_checker.h" | 49 #include "chrome/browser/net/chrome_dns_cert_provenance_checker.h" |
(...skipping 1491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1541 RLZTracker::InitRlzDelayed(is_first_run, master_prefs.ping_delay); | 1541 RLZTracker::InitRlzDelayed(is_first_run, master_prefs.ping_delay); |
1542 #endif | 1542 #endif |
1543 #endif | 1543 #endif |
1544 | 1544 |
1545 // Configure modules that need access to resources. | 1545 // Configure modules that need access to resources. |
1546 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); | 1546 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); |
1547 gfx::GfxModule::SetResourceProvider(chrome::GfxResourceProvider); | 1547 gfx::GfxModule::SetResourceProvider(chrome::GfxResourceProvider); |
1548 | 1548 |
1549 // Register our global network handler for chrome:// and | 1549 // Register our global network handler for chrome:// and |
1550 // chrome-extension:// URLs. | 1550 // chrome-extension:// URLs. |
1551 RegisterURLRequestChromeJob(); | 1551 ChromeURLDataManagerBackend::Register(); |
1552 RegisterExtensionProtocols(); | 1552 RegisterExtensionProtocols(); |
1553 RegisterMetadataURLRequestHandler(); | 1553 RegisterMetadataURLRequestHandler(); |
1554 RegisterBlobURLRequestJobFactory(); | 1554 RegisterBlobURLRequestJobFactory(); |
1555 | 1555 |
1556 if (parsed_command_line.HasSwitch(switches::kEnableFileSystemURLScheme)) | 1556 if (parsed_command_line.HasSwitch(switches::kEnableFileSystemURLScheme)) |
1557 RegisterFileSystemURLRequestJobFactory(); | 1557 RegisterFileSystemURLRequestJobFactory(); |
1558 | 1558 |
1559 // In unittest mode, this will do nothing. In normal mode, this will create | 1559 // In unittest mode, this will do nothing. In normal mode, this will create |
1560 // the global GoogleURLTracker and IntranetRedirectDetector instances, which | 1560 // the global GoogleURLTracker and IntranetRedirectDetector instances, which |
1561 // will promptly go to sleep for five and seven seconds, respectively (to | 1561 // will promptly go to sleep for five and seven seconds, respectively (to |
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1808 #if defined(OS_CHROMEOS) | 1808 #if defined(OS_CHROMEOS) |
1809 // To be precise, logout (browser shutdown) is not yet done, but the | 1809 // To be precise, logout (browser shutdown) is not yet done, but the |
1810 // remaining work is negligible, hence we say LogoutDone here. | 1810 // remaining work is negligible, hence we say LogoutDone here. |
1811 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 1811 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
1812 false); | 1812 false); |
1813 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 1813 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
1814 #endif | 1814 #endif |
1815 TRACE_EVENT_END("BrowserMain", 0, 0); | 1815 TRACE_EVENT_END("BrowserMain", 0, 0); |
1816 return result_code; | 1816 return result_code; |
1817 } | 1817 } |
OLD | NEW |