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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 #include "chrome/common/chrome_paths.h" | 74 #include "chrome/common/chrome_paths.h" |
75 #include "chrome/common/chrome_switches.h" | 75 #include "chrome/common/chrome_switches.h" |
76 #include "chrome/common/extensions/chrome_extensions_client.h" | 76 #include "chrome/common/extensions/chrome_extensions_client.h" |
77 #include "chrome/common/extensions/extension_l10n_util.h" | 77 #include "chrome/common/extensions/extension_l10n_util.h" |
78 #include "chrome/common/pref_names.h" | 78 #include "chrome/common/pref_names.h" |
79 #include "chrome/common/profile_management_switches.h" | 79 #include "chrome/common/profile_management_switches.h" |
80 #include "chrome/common/switch_utils.h" | 80 #include "chrome/common/switch_utils.h" |
81 #include "chrome/common/url_constants.h" | 81 #include "chrome/common/url_constants.h" |
82 #include "chrome/installer/util/google_update_constants.h" | 82 #include "chrome/installer/util/google_update_constants.h" |
83 #include "components/policy/core/common/policy_service.h" | 83 #include "components/policy/core/common/policy_service.h" |
| 84 #include "components/rappor/rappor_service.h" |
84 #include "components/translate/core/browser/translate_download_manager.h" | 85 #include "components/translate/core/browser/translate_download_manager.h" |
85 #include "content/public/browser/browser_thread.h" | 86 #include "content/public/browser/browser_thread.h" |
86 #include "content/public/browser/child_process_security_policy.h" | 87 #include "content/public/browser/child_process_security_policy.h" |
87 #include "content/public/browser/notification_details.h" | 88 #include "content/public/browser/notification_details.h" |
88 #include "content/public/browser/plugin_service.h" | 89 #include "content/public/browser/plugin_service.h" |
89 #include "content/public/browser/render_process_host.h" | 90 #include "content/public/browser/render_process_host.h" |
90 #include "content/public/browser/resource_dispatcher_host.h" | 91 #include "content/public/browser/resource_dispatcher_host.h" |
91 #include "extensions/common/constants.h" | 92 #include "extensions/common/constants.h" |
92 #include "net/socket/client_socket_pool_manager.h" | 93 #include "net/socket/client_socket_pool_manager.h" |
93 #include "net/url_request/url_request_context_getter.h" | 94 #include "net/url_request/url_request_context_getter.h" |
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 #endif | 437 #endif |
437 } | 438 } |
438 | 439 |
439 MetricsService* BrowserProcessImpl::metrics_service() { | 440 MetricsService* BrowserProcessImpl::metrics_service() { |
440 DCHECK(CalledOnValidThread()); | 441 DCHECK(CalledOnValidThread()); |
441 if (!created_metrics_service_) | 442 if (!created_metrics_service_) |
442 CreateMetricsService(); | 443 CreateMetricsService(); |
443 return metrics_service_.get(); | 444 return metrics_service_.get(); |
444 } | 445 } |
445 | 446 |
| 447 rappor::RapporService* BrowserProcessImpl::rappor_service() { |
| 448 DCHECK(CalledOnValidThread()); |
| 449 if (!rappor_service_.get()) |
| 450 rappor_service_.reset(new rappor::RapporService()); |
| 451 return rappor_service_.get(); |
| 452 } |
| 453 |
446 IOThread* BrowserProcessImpl::io_thread() { | 454 IOThread* BrowserProcessImpl::io_thread() { |
447 DCHECK(CalledOnValidThread()); | 455 DCHECK(CalledOnValidThread()); |
448 DCHECK(io_thread_.get()); | 456 DCHECK(io_thread_.get()); |
449 return io_thread_.get(); | 457 return io_thread_.get(); |
450 } | 458 } |
451 | 459 |
452 WatchDogThread* BrowserProcessImpl::watchdog_thread() { | 460 WatchDogThread* BrowserProcessImpl::watchdog_thread() { |
453 DCHECK(CalledOnValidThread()); | 461 DCHECK(CalledOnValidThread()); |
454 if (!created_watchdog_thread_) | 462 if (!created_watchdog_thread_) |
455 CreateWatchdogThread(); | 463 CreateWatchdogThread(); |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1118 } | 1126 } |
1119 | 1127 |
1120 void BrowserProcessImpl::OnAutoupdateTimer() { | 1128 void BrowserProcessImpl::OnAutoupdateTimer() { |
1121 if (CanAutorestartForUpdate()) { | 1129 if (CanAutorestartForUpdate()) { |
1122 DLOG(WARNING) << "Detected update. Restarting browser."; | 1130 DLOG(WARNING) << "Detected update. Restarting browser."; |
1123 RestartBackgroundInstance(); | 1131 RestartBackgroundInstance(); |
1124 } | 1132 } |
1125 } | 1133 } |
1126 | 1134 |
1127 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1135 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |