OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 30 matching lines...) Expand all Loading... |
41 #include "chrome/browser/chrome_thread.h" | 41 #include "chrome/browser/chrome_thread.h" |
42 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" | 42 #include "chrome/browser/dom_ui/chrome_url_data_manager.h" |
43 #include "chrome/browser/extensions/extension_protocols.h" | 43 #include "chrome/browser/extensions/extension_protocols.h" |
44 #include "chrome/browser/extensions/extensions_service.h" | 44 #include "chrome/browser/extensions/extensions_service.h" |
45 #include "chrome/browser/first_run/first_run.h" | 45 #include "chrome/browser/first_run/first_run.h" |
46 #include "chrome/browser/jankometer.h" | 46 #include "chrome/browser/jankometer.h" |
47 #include "chrome/browser/labs.h" | 47 #include "chrome/browser/labs.h" |
48 #include "chrome/browser/metrics/histogram_synchronizer.h" | 48 #include "chrome/browser/metrics/histogram_synchronizer.h" |
49 #include "chrome/browser/metrics/metrics_log.h" | 49 #include "chrome/browser/metrics/metrics_log.h" |
50 #include "chrome/browser/metrics/metrics_service.h" | 50 #include "chrome/browser/metrics/metrics_service.h" |
| 51 #include "chrome/browser/net/blob_url_request_job_factory.h" |
51 #include "chrome/browser/net/predictor_api.h" | 52 #include "chrome/browser/net/predictor_api.h" |
52 #include "chrome/browser/net/metadata_url_request.h" | 53 #include "chrome/browser/net/metadata_url_request.h" |
53 #include "chrome/browser/net/sdch_dictionary_fetcher.h" | 54 #include "chrome/browser/net/sdch_dictionary_fetcher.h" |
54 #include "chrome/browser/net/websocket_experiment/websocket_experiment_runner.h" | 55 #include "chrome/browser/net/websocket_experiment/websocket_experiment_runner.h" |
55 #include "chrome/browser/plugin_service.h" | 56 #include "chrome/browser/plugin_service.h" |
56 #include "chrome/browser/prefs/pref_service.h" | 57 #include "chrome/browser/prefs/pref_service.h" |
57 #include "chrome/browser/prefs/pref_value_store.h" | 58 #include "chrome/browser/prefs/pref_value_store.h" |
58 #include "chrome/browser/process_singleton.h" | 59 #include "chrome/browser/process_singleton.h" |
59 #include "chrome/browser/profile.h" | 60 #include "chrome/browser/profile.h" |
60 #include "chrome/browser/profile_manager.h" | 61 #include "chrome/browser/profile_manager.h" |
(...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1310 #endif | 1311 #endif |
1311 | 1312 |
1312 // Configure the network module so it has access to resources. | 1313 // Configure the network module so it has access to resources. |
1313 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); | 1314 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); |
1314 | 1315 |
1315 // Register our global network handler for chrome:// and | 1316 // Register our global network handler for chrome:// and |
1316 // chrome-extension:// URLs. | 1317 // chrome-extension:// URLs. |
1317 RegisterURLRequestChromeJob(); | 1318 RegisterURLRequestChromeJob(); |
1318 RegisterExtensionProtocols(); | 1319 RegisterExtensionProtocols(); |
1319 RegisterMetadataURLRequestHandler(); | 1320 RegisterMetadataURLRequestHandler(); |
| 1321 RegisterBlobURLRequestJobFactory(); |
1320 | 1322 |
1321 // In unittest mode, this will do nothing. In normal mode, this will create | 1323 // In unittest mode, this will do nothing. In normal mode, this will create |
1322 // the global GoogleURLTracker and IntranetRedirectDetector instances, which | 1324 // the global GoogleURLTracker and IntranetRedirectDetector instances, which |
1323 // will promptly go to sleep for five and seven seconds, respectively (to | 1325 // will promptly go to sleep for five and seven seconds, respectively (to |
1324 // avoid slowing startup), and wake up afterwards to see if they should do | 1326 // avoid slowing startup), and wake up afterwards to see if they should do |
1325 // anything else. | 1327 // anything else. |
1326 // | 1328 // |
1327 // A simpler way of doing all this would be to have some function which could | 1329 // A simpler way of doing all this would be to have some function which could |
1328 // give the time elapsed since startup, and simply have these objects check | 1330 // give the time elapsed since startup, and simply have these objects check |
1329 // that when asked to initialize themselves, but this doesn't seem to exist. | 1331 // that when asked to initialize themselves, but this doesn't seem to exist. |
1330 // | 1332 // |
1331 // These can't be created in the BrowserProcessImpl constructor because they | 1333 // These can't be created in the BrowserProcessImpl constructor because they |
1332 // need to read prefs that get set after that runs. | 1334 // need to read prefs that get set after that runs. |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1501 metrics->Stop(); | 1503 metrics->Stop(); |
1502 | 1504 |
1503 // browser_shutdown takes care of deleting browser_process, so we need to | 1505 // browser_shutdown takes care of deleting browser_process, so we need to |
1504 // release it. | 1506 // release it. |
1505 ignore_result(browser_process.release()); | 1507 ignore_result(browser_process.release()); |
1506 browser_shutdown::Shutdown(); | 1508 browser_shutdown::Shutdown(); |
1507 | 1509 |
1508 TRACE_EVENT_END("BrowserMain", 0, 0); | 1510 TRACE_EVENT_END("BrowserMain", 0, 0); |
1509 return result_code; | 1511 return result_code; |
1510 } | 1512 } |
OLD | NEW |