| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 #include "chrome/common/chrome_notification_types.h" | 60 #include "chrome/common/chrome_notification_types.h" |
| 61 #include "chrome/common/chrome_paths.h" | 61 #include "chrome/common/chrome_paths.h" |
| 62 #include "chrome/common/chrome_switches.h" | 62 #include "chrome/common/chrome_switches.h" |
| 63 #include "chrome/common/extensions/extension_l10n_util.h" | 63 #include "chrome/common/extensions/extension_l10n_util.h" |
| 64 #include "chrome/common/extensions/extension_resource.h" | 64 #include "chrome/common/extensions/extension_resource.h" |
| 65 #include "chrome/common/json_pref_store.h" | 65 #include "chrome/common/json_pref_store.h" |
| 66 #include "chrome/common/pref_names.h" | 66 #include "chrome/common/pref_names.h" |
| 67 #include "chrome/common/switch_utils.h" | 67 #include "chrome/common/switch_utils.h" |
| 68 #include "chrome/common/url_constants.h" | 68 #include "chrome/common/url_constants.h" |
| 69 #include "chrome/installer/util/google_update_constants.h" | 69 #include "chrome/installer/util/google_update_constants.h" |
| 70 #include "content/browser/child_process_security_policy.h" | |
| 71 #include "content/browser/download/mhtml_generation_manager.h" | 70 #include "content/browser/download/mhtml_generation_manager.h" |
| 72 #include "content/browser/net/browser_online_state_observer.h" | 71 #include "content/browser/net/browser_online_state_observer.h" |
| 73 #include "content/browser/renderer_host/resource_dispatcher_host.h" | 72 #include "content/browser/renderer_host/resource_dispatcher_host.h" |
| 74 #include "content/public/browser/browser_thread.h" | 73 #include "content/public/browser/browser_thread.h" |
| 74 #include "content/public/browser/child_process_security_policy.h" |
| 75 #include "content/public/browser/notification_details.h" | 75 #include "content/public/browser/notification_details.h" |
| 76 #include "content/public/browser/plugin_service.h" | 76 #include "content/public/browser/plugin_service.h" |
| 77 #include "content/public/browser/render_process_host.h" | 77 #include "content/public/browser/render_process_host.h" |
| 78 #include "media/audio/audio_manager.h" | 78 #include "media/audio/audio_manager.h" |
| 79 #include "net/socket/client_socket_pool_manager.h" | 79 #include "net/socket/client_socket_pool_manager.h" |
| 80 #include "net/url_request/url_request_context_getter.h" | 80 #include "net/url_request/url_request_context_getter.h" |
| 81 #include "ui/base/clipboard/clipboard.h" | 81 #include "ui/base/clipboard/clipboard.h" |
| 82 #include "ui/base/l10n/l10n_util.h" | 82 #include "ui/base/l10n/l10n_util.h" |
| 83 | 83 |
| 84 #if defined(OS_WIN) | 84 #if defined(OS_WIN) |
| (...skipping 21 matching lines...) Expand all Loading... |
| 106 #endif | 106 #endif |
| 107 | 107 |
| 108 #if defined(USE_X11) | 108 #if defined(USE_X11) |
| 109 // How long to wait for the File thread to complete during EndSession, on | 109 // How long to wait for the File thread to complete during EndSession, on |
| 110 // Linux. We have a timeout here because we're unable to run the UI messageloop | 110 // Linux. We have a timeout here because we're unable to run the UI messageloop |
| 111 // and there's some deadlock risk. Our only option is to exit anyway. | 111 // and there's some deadlock risk. Our only option is to exit anyway. |
| 112 static const int kEndSessionTimeoutSeconds = 10; | 112 static const int kEndSessionTimeoutSeconds = 10; |
| 113 #endif | 113 #endif |
| 114 | 114 |
| 115 using content::BrowserThread; | 115 using content::BrowserThread; |
| 116 using content::ChildProcessSecurityPolicy; |
| 116 using content::PluginService; | 117 using content::PluginService; |
| 117 | 118 |
| 118 BrowserProcessImpl::BrowserProcessImpl(const CommandLine& command_line) | 119 BrowserProcessImpl::BrowserProcessImpl(const CommandLine& command_line) |
| 119 : created_metrics_service_(false), | 120 : created_metrics_service_(false), |
| 120 created_watchdog_thread_(false), | 121 created_watchdog_thread_(false), |
| 121 created_profile_manager_(false), | 122 created_profile_manager_(false), |
| 122 created_local_state_(false), | 123 created_local_state_(false), |
| 123 created_icon_manager_(false), | 124 created_icon_manager_(false), |
| 124 created_browser_policy_connector_(false), | 125 created_browser_policy_connector_(false), |
| 125 created_notification_ui_manager_(false), | 126 created_notification_ui_manager_(false), |
| (...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 875 } | 876 } |
| 876 | 877 |
| 877 void BrowserProcessImpl::OnAutoupdateTimer() { | 878 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 878 if (CanAutorestartForUpdate()) { | 879 if (CanAutorestartForUpdate()) { |
| 879 DLOG(WARNING) << "Detected update. Restarting browser."; | 880 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 880 RestartBackgroundInstance(); | 881 RestartBackgroundInstance(); |
| 881 } | 882 } |
| 882 } | 883 } |
| 883 | 884 |
| 884 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 885 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |