| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 #include "chrome/common/extensions/extension_resource.h" | 66 #include "chrome/common/extensions/extension_resource.h" |
| 67 #include "chrome/common/json_pref_store.h" | 67 #include "chrome/common/json_pref_store.h" |
| 68 #include "chrome/common/pref_names.h" | 68 #include "chrome/common/pref_names.h" |
| 69 #include "chrome/common/switch_utils.h" | 69 #include "chrome/common/switch_utils.h" |
| 70 #include "chrome/common/url_constants.h" | 70 #include "chrome/common/url_constants.h" |
| 71 #include "chrome/installer/util/google_update_constants.h" | 71 #include "chrome/installer/util/google_update_constants.h" |
| 72 #include "content/browser/browser_child_process_host.h" | 72 #include "content/browser/browser_child_process_host.h" |
| 73 #include "content/browser/browser_thread.h" | 73 #include "content/browser/browser_thread.h" |
| 74 #include "content/browser/child_process_security_policy.h" | 74 #include "content/browser/child_process_security_policy.h" |
| 75 #include "content/browser/gpu/gpu_process_host_ui_shim.h" | 75 #include "content/browser/gpu/gpu_process_host_ui_shim.h" |
| 76 #include "content/browser/net/browser_online_state_observer.h" |
| 76 #include "content/browser/plugin_service.h" | 77 #include "content/browser/plugin_service.h" |
| 77 #include "content/browser/renderer_host/render_process_host.h" | 78 #include "content/browser/renderer_host/render_process_host.h" |
| 78 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 79 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
| 79 #include "content/common/notification_service.h" | 80 #include "content/common/notification_service.h" |
| 80 #include "ipc/ipc_logging.h" | 81 #include "ipc/ipc_logging.h" |
| 81 #include "net/url_request/url_request_context_getter.h" | 82 #include "net/url_request/url_request_context_getter.h" |
| 82 #include "ui/base/clipboard/clipboard.h" | 83 #include "ui/base/clipboard/clipboard.h" |
| 83 #include "ui/base/l10n/l10n_util.h" | 84 #include "ui/base/l10n/l10n_util.h" |
| 84 #include "webkit/database/database_tracker.h" | 85 #include "webkit/database/database_tracker.h" |
| 85 #include "webkit/plugins/npapi/plugin_list.h" | 86 #include "webkit/plugins/npapi/plugin_list.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 NotificationService::AllSources()); | 145 NotificationService::AllSources()); |
| 145 | 146 |
| 146 // Must be created after the NotificationService. | 147 // Must be created after the NotificationService. |
| 147 print_job_manager_.reset(new printing::PrintJobManager); | 148 print_job_manager_.reset(new printing::PrintJobManager); |
| 148 | 149 |
| 149 net_log_.reset(new ChromeNetLog); | 150 net_log_.reset(new ChromeNetLog); |
| 150 | 151 |
| 151 extension_event_router_forwarder_ = new ExtensionEventRouterForwarder; | 152 extension_event_router_forwarder_ = new ExtensionEventRouterForwarder; |
| 152 | 153 |
| 153 ExtensionTabIdMap::GetInstance()->Init(); | 154 ExtensionTabIdMap::GetInstance()->Init(); |
| 155 |
| 156 online_state_observer_.reset(new BrowserOnlineStateObserver); |
| 154 } | 157 } |
| 155 | 158 |
| 156 BrowserProcessImpl::~BrowserProcessImpl() { | 159 BrowserProcessImpl::~BrowserProcessImpl() { |
| 157 FilePath profile_path; | 160 FilePath profile_path; |
| 158 bool clear_local_state_on_exit; | 161 bool clear_local_state_on_exit; |
| 159 | 162 |
| 160 // Store the profile path for clearing local state data on exit. | 163 // Store the profile path for clearing local state data on exit. |
| 161 clear_local_state_on_exit = ShouldClearLocalState(&profile_path); | 164 clear_local_state_on_exit = ShouldClearLocalState(&profile_path); |
| 162 | 165 |
| 163 #if defined(OS_CHROMEOS) | 166 #if defined(OS_CHROMEOS) |
| (...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1133 } | 1136 } |
| 1134 | 1137 |
| 1135 void BrowserProcessImpl::OnAutoupdateTimer() { | 1138 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 1136 if (CanAutorestartForUpdate()) { | 1139 if (CanAutorestartForUpdate()) { |
| 1137 DLOG(WARNING) << "Detected update. Restarting browser."; | 1140 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 1138 RestartPersistentInstance(); | 1141 RestartPersistentInstance(); |
| 1139 } | 1142 } |
| 1140 } | 1143 } |
| 1141 | 1144 |
| 1142 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1145 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |