| 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 <stddef.h> | 7 #include <stddef.h> | 
| 8 | 8 | 
| 9 #include <algorithm> | 9 #include <algorithm> | 
| 10 #include <map> | 10 #include <map> | 
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 103 #include "components/prefs/pref_service.h" | 103 #include "components/prefs/pref_service.h" | 
| 104 #include "components/rappor/public/rappor_utils.h" | 104 #include "components/rappor/public/rappor_utils.h" | 
| 105 #include "components/rappor/rappor_service_impl.h" | 105 #include "components/rappor/rappor_service_impl.h" | 
| 106 #include "components/safe_json/safe_json_parser.h" | 106 #include "components/safe_json/safe_json_parser.h" | 
| 107 #include "components/signin/core/common/profile_management_switches.h" | 107 #include "components/signin/core/common/profile_management_switches.h" | 
| 108 #include "components/subresource_filter/content/browser/content_ruleset_service.
      h" | 108 #include "components/subresource_filter/content/browser/content_ruleset_service.
      h" | 
| 109 #include "components/subresource_filter/core/browser/ruleset_service.h" | 109 #include "components/subresource_filter/core/browser/ruleset_service.h" | 
| 110 #include "components/subresource_filter/core/browser/subresource_filter_constant
      s.h" | 110 #include "components/subresource_filter/core/browser/subresource_filter_constant
      s.h" | 
| 111 #include "components/subresource_filter/core/browser/subresource_filter_features
      .h" | 111 #include "components/subresource_filter/core/browser/subresource_filter_features
      .h" | 
| 112 #include "components/translate/core/browser/translate_download_manager.h" | 112 #include "components/translate/core/browser/translate_download_manager.h" | 
|  | 113 #include "components/ukm/ukm_service.h" | 
| 113 #include "components/update_client/update_query_params.h" | 114 #include "components/update_client/update_query_params.h" | 
| 114 #include "components/web_resource/web_resource_pref_names.h" | 115 #include "components/web_resource/web_resource_pref_names.h" | 
| 115 #include "content/public/browser/browser_thread.h" | 116 #include "content/public/browser/browser_thread.h" | 
| 116 #include "content/public/browser/child_process_security_policy.h" | 117 #include "content/public/browser/child_process_security_policy.h" | 
| 117 #include "content/public/browser/notification_details.h" | 118 #include "content/public/browser/notification_details.h" | 
| 118 #include "content/public/browser/plugin_service.h" | 119 #include "content/public/browser/plugin_service.h" | 
| 119 #include "content/public/browser/render_process_host.h" | 120 #include "content/public/browser/render_process_host.h" | 
| 120 #include "content/public/browser/resource_dispatcher_host.h" | 121 #include "content/public/browser/resource_dispatcher_host.h" | 
| 121 #include "content/public/browser/service_worker_context.h" | 122 #include "content/public/browser/service_worker_context.h" | 
| 122 #include "content/public/browser/storage_partition.h" | 123 #include "content/public/browser/storage_partition.h" | 
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 557 metrics::MetricsService* BrowserProcessImpl::metrics_service() { | 558 metrics::MetricsService* BrowserProcessImpl::metrics_service() { | 
| 558   DCHECK(CalledOnValidThread()); | 559   DCHECK(CalledOnValidThread()); | 
| 559   return GetMetricsServicesManager()->GetMetricsService(); | 560   return GetMetricsServicesManager()->GetMetricsService(); | 
| 560 } | 561 } | 
| 561 | 562 | 
| 562 rappor::RapporServiceImpl* BrowserProcessImpl::rappor_service() { | 563 rappor::RapporServiceImpl* BrowserProcessImpl::rappor_service() { | 
| 563   DCHECK(CalledOnValidThread()); | 564   DCHECK(CalledOnValidThread()); | 
| 564   return GetMetricsServicesManager()->GetRapporServiceImpl(); | 565   return GetMetricsServicesManager()->GetRapporServiceImpl(); | 
| 565 } | 566 } | 
| 566 | 567 | 
| 567 ukm::UkmService* BrowserProcessImpl::ukm_service() { | 568 ukm::UkmRecorder* BrowserProcessImpl::ukm_recorder() { | 
| 568   DCHECK(CalledOnValidThread()); | 569   DCHECK(CalledOnValidThread()); | 
| 569   return GetMetricsServicesManager()->GetUkmService(); | 570   return GetMetricsServicesManager()->GetUkmService(); | 
| 570 } | 571 } | 
| 571 | 572 | 
| 572 IOThread* BrowserProcessImpl::io_thread() { | 573 IOThread* BrowserProcessImpl::io_thread() { | 
| 573   DCHECK(CalledOnValidThread()); | 574   DCHECK(CalledOnValidThread()); | 
| 574   DCHECK(io_thread_.get()); | 575   DCHECK(io_thread_.get()); | 
| 575   return io_thread_.get(); | 576   return io_thread_.get(); | 
| 576 } | 577 } | 
| 577 | 578 | 
| (...skipping 846 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1424 } | 1425 } | 
| 1425 | 1426 | 
| 1426 void BrowserProcessImpl::OnAutoupdateTimer() { | 1427 void BrowserProcessImpl::OnAutoupdateTimer() { | 
| 1427   if (CanAutorestartForUpdate()) { | 1428   if (CanAutorestartForUpdate()) { | 
| 1428     DLOG(WARNING) << "Detected update.  Restarting browser."; | 1429     DLOG(WARNING) << "Detected update.  Restarting browser."; | 
| 1429     RestartBackgroundInstance(); | 1430     RestartBackgroundInstance(); | 
| 1430   } | 1431   } | 
| 1431 } | 1432 } | 
| 1432 | 1433 | 
| 1433 #endif  // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 1434 #endif  // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) | 
| OLD | NEW | 
|---|