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