| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 #include "chrome/browser/platform_util.h" | 44 #include "chrome/browser/platform_util.h" |
| 45 #include "chrome/browser/plugin_data_remover.h" | 45 #include "chrome/browser/plugin_data_remover.h" |
| 46 #include "chrome/browser/policy/browser_policy_connector.h" | 46 #include "chrome/browser/policy/browser_policy_connector.h" |
| 47 #include "chrome/browser/prefs/browser_prefs.h" | 47 #include "chrome/browser/prefs/browser_prefs.h" |
| 48 #include "chrome/browser/prefs/pref_service.h" | 48 #include "chrome/browser/prefs/pref_service.h" |
| 49 #include "chrome/browser/prerender/prerender_tracker.h" | 49 #include "chrome/browser/prerender/prerender_tracker.h" |
| 50 #include "chrome/browser/printing/background_printing_manager.h" | 50 #include "chrome/browser/printing/background_printing_manager.h" |
| 51 #include "chrome/browser/printing/print_job_manager.h" | 51 #include "chrome/browser/printing/print_job_manager.h" |
| 52 #include "chrome/browser/printing/print_preview_tab_controller.h" | 52 #include "chrome/browser/printing/print_preview_tab_controller.h" |
| 53 #include "chrome/browser/profiles/profile_manager.h" | 53 #include "chrome/browser/profiles/profile_manager.h" |
| 54 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_observer.
h" | 54 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.
h" |
| 55 #include "chrome/browser/safe_browsing/client_side_detection_service.h" | 55 #include "chrome/browser/safe_browsing/client_side_detection_service.h" |
| 56 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 56 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
| 57 #include "chrome/browser/shell_integration.h" | 57 #include "chrome/browser/shell_integration.h" |
| 58 #include "chrome/browser/sidebar/sidebar_manager.h" | 58 #include "chrome/browser/sidebar/sidebar_manager.h" |
| 59 #include "chrome/browser/status_icons/status_tray.h" | 59 #include "chrome/browser/status_icons/status_tray.h" |
| 60 #include "chrome/browser/tab_closeable_state_watcher.h" | 60 #include "chrome/browser/tab_closeable_state_watcher.h" |
| 61 #include "chrome/browser/ui/browser_list.h" | 61 #include "chrome/browser/ui/browser_list.h" |
| 62 #include "chrome/common/chrome_constants.h" | 62 #include "chrome/common/chrome_constants.h" |
| 63 #include "chrome/common/chrome_paths.h" | 63 #include "chrome/common/chrome_paths.h" |
| 64 #include "chrome/common/chrome_switches.h" | 64 #include "chrome/common/chrome_switches.h" |
| (...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 created_resource_dispatcher_host_ = true; | 733 created_resource_dispatcher_host_ = true; |
| 734 | 734 |
| 735 // UserScriptListener will delete itself. | 735 // UserScriptListener will delete itself. |
| 736 ResourceQueue::DelegateSet resource_queue_delegates; | 736 ResourceQueue::DelegateSet resource_queue_delegates; |
| 737 resource_queue_delegates.insert(new UserScriptListener()); | 737 resource_queue_delegates.insert(new UserScriptListener()); |
| 738 | 738 |
| 739 resource_dispatcher_host_.reset( | 739 resource_dispatcher_host_.reset( |
| 740 new ResourceDispatcherHost(resource_queue_delegates)); | 740 new ResourceDispatcherHost(resource_queue_delegates)); |
| 741 resource_dispatcher_host_->Initialize(); | 741 resource_dispatcher_host_->Initialize(); |
| 742 | 742 |
| 743 resource_dispatcher_host_observer_.reset( | 743 resource_dispatcher_host_delegate_.reset( |
| 744 new ChromeResourceDispatcherHostObserver(resource_dispatcher_host_.get(), | 744 new ChromeResourceDispatcherHostDelegate(resource_dispatcher_host_.get(), |
| 745 prerender_tracker())); | 745 prerender_tracker())); |
| 746 resource_dispatcher_host_->set_observer( | 746 resource_dispatcher_host_->set_delegate( |
| 747 resource_dispatcher_host_observer_.get()); | 747 resource_dispatcher_host_delegate_.get()); |
| 748 | 748 |
| 749 pref_change_registrar_.Add(prefs::kAllowCrossOriginAuthPrompt, this); | 749 pref_change_registrar_.Add(prefs::kAllowCrossOriginAuthPrompt, this); |
| 750 ApplyAllowCrossOriginAuthPromptPolicy(); | 750 ApplyAllowCrossOriginAuthPromptPolicy(); |
| 751 } | 751 } |
| 752 | 752 |
| 753 void BrowserProcessImpl::CreateMetricsService() { | 753 void BrowserProcessImpl::CreateMetricsService() { |
| 754 DCHECK(!created_metrics_service_ && metrics_service_.get() == NULL); | 754 DCHECK(!created_metrics_service_ && metrics_service_.get() == NULL); |
| 755 created_metrics_service_ = true; | 755 created_metrics_service_ = true; |
| 756 | 756 |
| 757 metrics_service_.reset(new MetricsService); | 757 metrics_service_.reset(new MetricsService); |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1137 } | 1137 } |
| 1138 | 1138 |
| 1139 void BrowserProcessImpl::OnAutoupdateTimer() { | 1139 void BrowserProcessImpl::OnAutoupdateTimer() { |
| 1140 if (CanAutorestartForUpdate()) { | 1140 if (CanAutorestartForUpdate()) { |
| 1141 DLOG(WARNING) << "Detected update. Restarting browser."; | 1141 DLOG(WARNING) << "Detected update. Restarting browser."; |
| 1142 RestartPersistentInstance(); | 1142 RestartPersistentInstance(); |
| 1143 } | 1143 } |
| 1144 } | 1144 } |
| 1145 | 1145 |
| 1146 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1146 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
| OLD | NEW |