| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 #include "chrome/browser/service/service_process_control_manager.h" | 71 #include "chrome/browser/service/service_process_control_manager.h" |
| 72 #include "chrome/browser/shell_integration.h" | 72 #include "chrome/browser/shell_integration.h" |
| 73 #include "chrome/browser/translate/translate_manager.h" | 73 #include "chrome/browser/translate/translate_manager.h" |
| 74 #include "chrome/browser/ui/browser.h" | 74 #include "chrome/browser/ui/browser.h" |
| 75 #include "chrome/browser/ui/browser_init.h" | 75 #include "chrome/browser/ui/browser_init.h" |
| 76 #include "chrome/common/child_process.h" | 76 #include "chrome/common/child_process.h" |
| 77 #include "chrome/common/chrome_constants.h" | 77 #include "chrome/common/chrome_constants.h" |
| 78 #include "chrome/common/chrome_paths.h" | 78 #include "chrome/common/chrome_paths.h" |
| 79 #include "chrome/common/chrome_switches.h" | 79 #include "chrome/common/chrome_switches.h" |
| 80 #include "chrome/common/env_vars.h" | 80 #include "chrome/common/env_vars.h" |
| 81 #include "chrome/common/gfx_resource_provider.h" |
| 81 #include "chrome/common/json_pref_store.h" | 82 #include "chrome/common/json_pref_store.h" |
| 82 #include "chrome/common/jstemplate_builder.h" | 83 #include "chrome/common/jstemplate_builder.h" |
| 83 #include "chrome/common/logging_chrome.h" | 84 #include "chrome/common/logging_chrome.h" |
| 84 #include "chrome/common/main_function_params.h" | 85 #include "chrome/common/main_function_params.h" |
| 85 #include "chrome/common/net/net_resource_provider.h" | 86 #include "chrome/common/net/net_resource_provider.h" |
| 86 #include "chrome/common/pref_names.h" | 87 #include "chrome/common/pref_names.h" |
| 87 #include "chrome/common/result_codes.h" | 88 #include "chrome/common/result_codes.h" |
| 88 #include "chrome/installer/util/google_update_settings.h" | 89 #include "chrome/installer/util/google_update_settings.h" |
| 90 #include "gfx/gfx_module.h" |
| 89 #include "grit/app_locale_settings.h" | 91 #include "grit/app_locale_settings.h" |
| 90 #include "grit/chromium_strings.h" | 92 #include "grit/chromium_strings.h" |
| 91 #include "grit/generated_resources.h" | 93 #include "grit/generated_resources.h" |
| 92 #include "net/base/cookie_monster.h" | 94 #include "net/base/cookie_monster.h" |
| 93 #include "net/base/net_module.h" | 95 #include "net/base/net_module.h" |
| 94 #include "net/base/network_change_notifier.h" | 96 #include "net/base/network_change_notifier.h" |
| 95 #include "net/http/http_network_layer.h" | 97 #include "net/http/http_network_layer.h" |
| 96 #include "net/http/http_stream_factory.h" | 98 #include "net/http/http_stream_factory.h" |
| 97 #include "net/socket/client_socket_pool_base.h" | 99 #include "net/socket/client_socket_pool_base.h" |
| 98 #include "net/socket/client_socket_pool_manager.h" | 100 #include "net/socket/client_socket_pool_manager.h" |
| (...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1490 app::win::ScopedCOMInitializer com_initializer; | 1492 app::win::ScopedCOMInitializer com_initializer; |
| 1491 | 1493 |
| 1492 #if defined(GOOGLE_CHROME_BUILD) | 1494 #if defined(GOOGLE_CHROME_BUILD) |
| 1493 // Init the RLZ library. This just binds the dll and schedules a task on the | 1495 // Init the RLZ library. This just binds the dll and schedules a task on the |
| 1494 // file thread to be run sometime later. If this is the first run we record | 1496 // file thread to be run sometime later. If this is the first run we record |
| 1495 // the installation event. | 1497 // the installation event. |
| 1496 RLZTracker::InitRlzDelayed(is_first_run, master_prefs.ping_delay); | 1498 RLZTracker::InitRlzDelayed(is_first_run, master_prefs.ping_delay); |
| 1497 #endif | 1499 #endif |
| 1498 #endif | 1500 #endif |
| 1499 | 1501 |
| 1500 // Configure the network module so it has access to resources. | 1502 // Configure modules that need access to resources. |
| 1501 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); | 1503 net::NetModule::SetResourceProvider(chrome_common_net::NetResourceProvider); |
| 1504 gfx::GfxModule::SetResourceProvider(chrome::GfxResourceProvider); |
| 1502 | 1505 |
| 1503 // Register our global network handler for chrome:// and | 1506 // Register our global network handler for chrome:// and |
| 1504 // chrome-extension:// URLs. | 1507 // chrome-extension:// URLs. |
| 1505 RegisterURLRequestChromeJob(); | 1508 RegisterURLRequestChromeJob(); |
| 1506 RegisterExtensionProtocols(); | 1509 RegisterExtensionProtocols(); |
| 1507 RegisterMetadataURLRequestHandler(); | 1510 RegisterMetadataURLRequestHandler(); |
| 1508 RegisterBlobURLRequestJobFactory(); | 1511 RegisterBlobURLRequestJobFactory(); |
| 1509 | 1512 |
| 1510 // In unittest mode, this will do nothing. In normal mode, this will create | 1513 // In unittest mode, this will do nothing. In normal mode, this will create |
| 1511 // the global GoogleURLTracker and IntranetRedirectDetector instances, which | 1514 // the global GoogleURLTracker and IntranetRedirectDetector instances, which |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1735 #if defined(OS_CHROMEOS) | 1738 #if defined(OS_CHROMEOS) |
| 1736 // To be precise, logout (browser shutdown) is not yet done, but the | 1739 // To be precise, logout (browser shutdown) is not yet done, but the |
| 1737 // remaining work is negligible, hence we say LogoutDone here. | 1740 // remaining work is negligible, hence we say LogoutDone here. |
| 1738 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", | 1741 chromeos::BootTimesLoader::Get()->AddLogoutTimeMarker("LogoutDone", |
| 1739 false); | 1742 false); |
| 1740 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); | 1743 chromeos::BootTimesLoader::Get()->WriteLogoutTimes(); |
| 1741 #endif | 1744 #endif |
| 1742 TRACE_EVENT_END("BrowserMain", 0, 0); | 1745 TRACE_EVENT_END("BrowserMain", 0, 0); |
| 1743 return result_code; | 1746 return result_code; |
| 1744 } | 1747 } |
| OLD | NEW |