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 <algorithm> | 7 #include <algorithm> |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #include "chrome/browser/idle.h" | 43 #include "chrome/browser/idle.h" |
44 #include "chrome/browser/intranet_redirect_detector.h" | 44 #include "chrome/browser/intranet_redirect_detector.h" |
45 #include "chrome/browser/io_thread.h" | 45 #include "chrome/browser/io_thread.h" |
46 #include "chrome/browser/lifetime/application_lifetime.h" | 46 #include "chrome/browser/lifetime/application_lifetime.h" |
47 #include "chrome/browser/metrics/metrics_service.h" | 47 #include "chrome/browser/metrics/metrics_service.h" |
48 #include "chrome/browser/metrics/metrics_services_manager.h" | 48 #include "chrome/browser/metrics/metrics_services_manager.h" |
49 #include "chrome/browser/metrics/thread_watcher.h" | 49 #include "chrome/browser/metrics/thread_watcher.h" |
50 #include "chrome/browser/net/chrome_net_log.h" | 50 #include "chrome/browser/net/chrome_net_log.h" |
51 #include "chrome/browser/net/crl_set_fetcher.h" | 51 #include "chrome/browser/net/crl_set_fetcher.h" |
52 #include "chrome/browser/net/sdch_dictionary_fetcher.h" | 52 #include "chrome/browser/net/sdch_dictionary_fetcher.h" |
53 #include "chrome/browser/network_time/network_time_tracker.h" | |
54 #include "chrome/browser/notifications/notification_ui_manager.h" | 53 #include "chrome/browser/notifications/notification_ui_manager.h" |
55 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" | 54 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" |
56 #include "chrome/browser/plugins/plugin_finder.h" | 55 #include "chrome/browser/plugins/plugin_finder.h" |
57 #include "chrome/browser/prefs/browser_prefs.h" | 56 #include "chrome/browser/prefs/browser_prefs.h" |
58 #include "chrome/browser/prefs/chrome_pref_service_factory.h" | 57 #include "chrome/browser/prefs/chrome_pref_service_factory.h" |
59 #include "chrome/browser/prerender/prerender_tracker.h" | 58 #include "chrome/browser/prerender/prerender_tracker.h" |
60 #include "chrome/browser/printing/background_printing_manager.h" | 59 #include "chrome/browser/printing/background_printing_manager.h" |
61 #include "chrome/browser/printing/print_job_manager.h" | 60 #include "chrome/browser/printing/print_job_manager.h" |
62 #include "chrome/browser/printing/print_preview_dialog_controller.h" | 61 #include "chrome/browser/printing/print_preview_dialog_controller.h" |
63 #include "chrome/browser/profiles/profile_manager.h" | 62 #include "chrome/browser/profiles/profile_manager.h" |
64 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.
h" | 63 #include "chrome/browser/renderer_host/chrome_resource_dispatcher_host_delegate.
h" |
65 #include "chrome/browser/safe_browsing/safe_browsing_service.h" | 64 #include "chrome/browser/safe_browsing/safe_browsing_service.h" |
66 #include "chrome/browser/shell_integration.h" | 65 #include "chrome/browser/shell_integration.h" |
67 #include "chrome/browser/status_icons/status_tray.h" | 66 #include "chrome/browser/status_icons/status_tray.h" |
68 #include "chrome/browser/ui/browser_dialogs.h" | 67 #include "chrome/browser/ui/browser_dialogs.h" |
69 #include "chrome/browser/ui/browser_finder.h" | 68 #include "chrome/browser/ui/browser_finder.h" |
70 #include "chrome/browser/web_resource/promo_resource_service.h" | 69 #include "chrome/browser/web_resource/promo_resource_service.h" |
71 #include "chrome/common/chrome_constants.h" | 70 #include "chrome/common/chrome_constants.h" |
72 #include "chrome/common/chrome_paths.h" | 71 #include "chrome/common/chrome_paths.h" |
73 #include "chrome/common/chrome_switches.h" | 72 #include "chrome/common/chrome_switches.h" |
74 #include "chrome/common/extensions/chrome_extensions_client.h" | 73 #include "chrome/common/extensions/chrome_extensions_client.h" |
75 #include "chrome/common/pref_names.h" | 74 #include "chrome/common/pref_names.h" |
76 #include "chrome/common/switch_utils.h" | 75 #include "chrome/common/switch_utils.h" |
77 #include "chrome/common/url_constants.h" | 76 #include "chrome/common/url_constants.h" |
78 #include "chrome/installer/util/google_update_constants.h" | 77 #include "chrome/installer/util/google_update_constants.h" |
79 #include "chrome/installer/util/google_update_settings.h" | 78 #include "chrome/installer/util/google_update_settings.h" |
| 79 #include "components/network_time/network_time_tracker.h" |
80 #include "components/policy/core/common/policy_service.h" | 80 #include "components/policy/core/common/policy_service.h" |
81 #include "components/signin/core/common/profile_management_switches.h" | 81 #include "components/signin/core/common/profile_management_switches.h" |
82 #include "components/translate/core/browser/translate_download_manager.h" | 82 #include "components/translate/core/browser/translate_download_manager.h" |
83 #include "content/public/browser/browser_thread.h" | 83 #include "content/public/browser/browser_thread.h" |
84 #include "content/public/browser/child_process_security_policy.h" | 84 #include "content/public/browser/child_process_security_policy.h" |
85 #include "content/public/browser/notification_details.h" | 85 #include "content/public/browser/notification_details.h" |
86 #include "content/public/browser/plugin_service.h" | 86 #include "content/public/browser/plugin_service.h" |
87 #include "content/public/browser/render_process_host.h" | 87 #include "content/public/browser/render_process_host.h" |
88 #include "content/public/browser/resource_dispatcher_host.h" | 88 #include "content/public/browser/resource_dispatcher_host.h" |
89 #include "content/public/browser/service_worker_context.h" | 89 #include "content/public/browser/service_worker_context.h" |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 } | 626 } |
627 | 627 |
628 #if defined(ENABLE_WEBRTC) | 628 #if defined(ENABLE_WEBRTC) |
629 WebRtcLogUploader* BrowserProcessImpl::webrtc_log_uploader() { | 629 WebRtcLogUploader* BrowserProcessImpl::webrtc_log_uploader() { |
630 if (!webrtc_log_uploader_.get()) | 630 if (!webrtc_log_uploader_.get()) |
631 webrtc_log_uploader_.reset(new WebRtcLogUploader()); | 631 webrtc_log_uploader_.reset(new WebRtcLogUploader()); |
632 return webrtc_log_uploader_.get(); | 632 return webrtc_log_uploader_.get(); |
633 } | 633 } |
634 #endif | 634 #endif |
635 | 635 |
636 NetworkTimeTracker* BrowserProcessImpl::network_time_tracker() { | 636 network_time::NetworkTimeTracker* BrowserProcessImpl::network_time_tracker() { |
637 if (!network_time_tracker_) { | 637 if (!network_time_tracker_) { |
638 network_time_tracker_.reset(new NetworkTimeTracker( | 638 network_time_tracker_.reset(new network_time::NetworkTimeTracker( |
639 scoped_ptr<base::TickClock>(new base::DefaultTickClock()), | 639 scoped_ptr<base::TickClock>(new base::DefaultTickClock()), |
640 local_state())); | 640 local_state())); |
641 } | 641 } |
642 return network_time_tracker_.get(); | 642 return network_time_tracker_.get(); |
643 } | 643 } |
644 | 644 |
645 // static | 645 // static |
646 void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) { | 646 void BrowserProcessImpl::RegisterPrefs(PrefRegistrySimple* registry) { |
647 registry->RegisterBooleanPref(prefs::kDefaultBrowserSettingEnabled, | 647 registry->RegisterBooleanPref(prefs::kDefaultBrowserSettingEnabled, |
648 false); | 648 false); |
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1066 } | 1066 } |
1067 | 1067 |
1068 void BrowserProcessImpl::OnAutoupdateTimer() { | 1068 void BrowserProcessImpl::OnAutoupdateTimer() { |
1069 if (CanAutorestartForUpdate()) { | 1069 if (CanAutorestartForUpdate()) { |
1070 DLOG(WARNING) << "Detected update. Restarting browser."; | 1070 DLOG(WARNING) << "Detected update. Restarting browser."; |
1071 RestartBackgroundInstance(); | 1071 RestartBackgroundInstance(); |
1072 } | 1072 } |
1073 } | 1073 } |
1074 | 1074 |
1075 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1075 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |