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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
72 #include "chrome/browser/web_resource/promo_resource_service.h" | 72 #include "chrome/browser/web_resource/promo_resource_service.h" |
73 #include "chrome/common/chrome_constants.h" | 73 #include "chrome/common/chrome_constants.h" |
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/switch_utils.h" | 79 #include "chrome/common/switch_utils.h" |
80 #include "chrome/common/url_constants.h" | 80 #include "chrome/common/url_constants.h" |
81 #include "chrome/installer/util/google_update_constants.h" | 81 #include "chrome/installer/util/google_update_constants.h" |
82 #include "components/rappor/rappor_service.h" | |
82 #include "content/public/browser/browser_thread.h" | 83 #include "content/public/browser/browser_thread.h" |
83 #include "content/public/browser/child_process_security_policy.h" | 84 #include "content/public/browser/child_process_security_policy.h" |
84 #include "content/public/browser/notification_details.h" | 85 #include "content/public/browser/notification_details.h" |
85 #include "content/public/browser/plugin_service.h" | 86 #include "content/public/browser/plugin_service.h" |
86 #include "content/public/browser/render_process_host.h" | 87 #include "content/public/browser/render_process_host.h" |
87 #include "content/public/browser/resource_dispatcher_host.h" | 88 #include "content/public/browser/resource_dispatcher_host.h" |
88 #include "extensions/common/constants.h" | 89 #include "extensions/common/constants.h" |
89 #include "net/socket/client_socket_pool_manager.h" | 90 #include "net/socket/client_socket_pool_manager.h" |
90 #include "net/url_request/url_request_context_getter.h" | 91 #include "net/url_request/url_request_context_getter.h" |
91 #include "ui/base/l10n/l10n_util.h" | 92 #include "ui/base/l10n/l10n_util.h" |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
428 #endif | 429 #endif |
429 } | 430 } |
430 | 431 |
431 MetricsService* BrowserProcessImpl::metrics_service() { | 432 MetricsService* BrowserProcessImpl::metrics_service() { |
432 DCHECK(CalledOnValidThread()); | 433 DCHECK(CalledOnValidThread()); |
433 if (!created_metrics_service_) | 434 if (!created_metrics_service_) |
434 CreateMetricsService(); | 435 CreateMetricsService(); |
435 return metrics_service_.get(); | 436 return metrics_service_.get(); |
436 } | 437 } |
437 | 438 |
439 rappor::RapporService* BrowserProcessImpl::rappor_service() { | |
440 DCHECK(CalledOnValidThread()); | |
441 if (!rappor_service_.get()) { | |
Alexei Svitkine (slow)
2013/12/19 19:47:02
Nit: No {}s
Steven Holte
2013/12/20 03:03:55
Done.
| |
442 rappor_service_.reset(new rappor::RapporService()); | |
443 } | |
444 return rappor_service_.get(); | |
445 } | |
446 | |
438 IOThread* BrowserProcessImpl::io_thread() { | 447 IOThread* BrowserProcessImpl::io_thread() { |
439 DCHECK(CalledOnValidThread()); | 448 DCHECK(CalledOnValidThread()); |
440 DCHECK(io_thread_.get()); | 449 DCHECK(io_thread_.get()); |
441 return io_thread_.get(); | 450 return io_thread_.get(); |
442 } | 451 } |
443 | 452 |
444 WatchDogThread* BrowserProcessImpl::watchdog_thread() { | 453 WatchDogThread* BrowserProcessImpl::watchdog_thread() { |
445 DCHECK(CalledOnValidThread()); | 454 DCHECK(CalledOnValidThread()); |
446 if (!created_watchdog_thread_) | 455 if (!created_watchdog_thread_) |
447 CreateWatchdogThread(); | 456 CreateWatchdogThread(); |
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1102 } | 1111 } |
1103 | 1112 |
1104 void BrowserProcessImpl::OnAutoupdateTimer() { | 1113 void BrowserProcessImpl::OnAutoupdateTimer() { |
1105 if (CanAutorestartForUpdate()) { | 1114 if (CanAutorestartForUpdate()) { |
1106 DLOG(WARNING) << "Detected update. Restarting browser."; | 1115 DLOG(WARNING) << "Detected update. Restarting browser."; |
1107 RestartBackgroundInstance(); | 1116 RestartBackgroundInstance(); |
1108 } | 1117 } |
1109 } | 1118 } |
1110 | 1119 |
1111 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1120 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) |
OLD | NEW |