| 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_process_impl.h" | 5 #include "chrome/browser/browser_process_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 #include "chrome/common/url_constants.h" | 65 #include "chrome/common/url_constants.h" |
| 66 #include "chrome/installer/util/google_update_constants.h" | 66 #include "chrome/installer/util/google_update_constants.h" |
| 67 #include "content/browser/browser_child_process_host.h" | 67 #include "content/browser/browser_child_process_host.h" |
| 68 #include "content/browser/browser_thread.h" | 68 #include "content/browser/browser_thread.h" |
| 69 #include "content/browser/child_process_security_policy.h" | 69 #include "content/browser/child_process_security_policy.h" |
| 70 #include "content/browser/debugger/browser_list_tabcontents_provider.h" | 70 #include "content/browser/debugger/browser_list_tabcontents_provider.h" |
| 71 #include "content/browser/debugger/devtools_http_protocol_handler.h" | 71 #include "content/browser/debugger/devtools_http_protocol_handler.h" |
| 72 #include "content/browser/debugger/devtools_manager.h" | 72 #include "content/browser/debugger/devtools_manager.h" |
| 73 #include "content/browser/debugger/devtools_protocol_handler.h" | 73 #include "content/browser/debugger/devtools_protocol_handler.h" |
| 74 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 74 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
| 75 #include "content/browser/net/browser_online_state_observer.h" |
| 75 #include "content/browser/plugin_service.h" | 76 #include "content/browser/plugin_service.h" |
| 76 #include "content/browser/renderer_host/render_process_host.h" | 77 #include "content/browser/renderer_host/render_process_host.h" |
| 77 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 78 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
| 78 #include "content/common/notification_service.h" | 79 #include "content/common/notification_service.h" |
| 79 #include "ipc/ipc_logging.h" | 80 #include "ipc/ipc_logging.h" |
| 80 #include "net/url_request/url_request_context_getter.h" | 81 #include "net/url_request/url_request_context_getter.h" |
| 81 #include "ui/base/clipboard/clipboard.h" | 82 #include "ui/base/clipboard/clipboard.h" |
| 82 #include "ui/base/l10n/l10n_util.h" | 83 #include "ui/base/l10n/l10n_util.h" |
| 83 #include "webkit/database/database_tracker.h" | 84 #include "webkit/database/database_tracker.h" |
| 84 #include "webkit/plugins/npapi/plugin_list.h" | 85 #include "webkit/plugins/npapi/plugin_list.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 main_notification_service_.reset(new NotificationService); | 140 main_notification_service_.reset(new NotificationService); |
| 140 | 141 |
| 141 // Must be created after the NotificationService. | 142 // Must be created after the NotificationService. |
| 142 print_job_manager_.reset(new printing::PrintJobManager); | 143 print_job_manager_.reset(new printing::PrintJobManager); |
| 143 | 144 |
| 144 net_log_.reset(new ChromeNetLog); | 145 net_log_.reset(new ChromeNetLog); |
| 145 | 146 |
| 146 extension_event_router_forwarder_ = new ExtensionEventRouterForwarder; | 147 extension_event_router_forwarder_ = new ExtensionEventRouterForwarder; |
| 147 | 148 |
| 148 ExtensionTabIdMap::GetInstance()->Init(); | 149 ExtensionTabIdMap::GetInstance()->Init(); |
| 150 |
| 151 online_state_observer_.reset(new BrowserOnlineStateObserver); |
| 149 } | 152 } |
| 150 | 153 |
| 151 BrowserProcessImpl::~BrowserProcessImpl() { | 154 BrowserProcessImpl::~BrowserProcessImpl() { |
| 152 FilePath profile_path; | 155 FilePath profile_path; |
| 153 bool clear_local_state_on_exit; | 156 bool clear_local_state_on_exit; |
| 154 | 157 |
| 155 // Store the profile path for clearing local state data on exit. | 158 // Store the profile path for clearing local state data on exit. |
| 156 clear_local_state_on_exit = ShouldClearLocalState(&profile_path); | 159 clear_local_state_on_exit = ShouldClearLocalState(&profile_path); |
| 157 | 160 |
| 158 #if defined(OS_CHROMEOS) | 161 #if defined(OS_CHROMEOS) |
| (...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1108 } | 1111 } |
| 1109 | 1112 |
| 1110 void BrowserProcessImpl::OnAutoupdateTimer() { | 1113 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 1111 if (CanAutorestartForUpdate()) { | 1114 if (CanAutorestartForUpdate()) { |
| 1112 DLOG(WARNING) << "Detected update. Restarting browser."; | 1115 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 1113 RestartPersistentInstance(); | 1116 RestartPersistentInstance(); |
| 1114 } | 1117 } |
| 1115 } | 1118 } |
| 1116 | 1119 |
| 1117 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1120 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |