Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(570)

Side by Side Diff: chrome/browser/browser_process_impl.cc

Issue 1418763002: Revert of Eliminate //chrome dependencies from MetricsServicesManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/metrics/chrome_metrics_service_accessor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 25 matching lines...) Expand all
36 #include "chrome/browser/devtools/remote_debugging_server.h" 36 #include "chrome/browser/devtools/remote_debugging_server.h"
37 #include "chrome/browser/download/download_request_limiter.h" 37 #include "chrome/browser/download/download_request_limiter.h"
38 #include "chrome/browser/download/download_status_updater.h" 38 #include "chrome/browser/download/download_status_updater.h"
39 #include "chrome/browser/gpu/gl_string_manager.h" 39 #include "chrome/browser/gpu/gl_string_manager.h"
40 #include "chrome/browser/gpu/gpu_mode_manager.h" 40 #include "chrome/browser/gpu/gpu_mode_manager.h"
41 #include "chrome/browser/icon_manager.h" 41 #include "chrome/browser/icon_manager.h"
42 #include "chrome/browser/intranet_redirect_detector.h" 42 #include "chrome/browser/intranet_redirect_detector.h"
43 #include "chrome/browser/io_thread.h" 43 #include "chrome/browser/io_thread.h"
44 #include "chrome/browser/lifetime/application_lifetime.h" 44 #include "chrome/browser/lifetime/application_lifetime.h"
45 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h" 45 #include "chrome/browser/metrics/chrome_metrics_service_accessor.h"
46 #include "chrome/browser/metrics/chrome_metrics_services_manager_client.h"
47 #include "chrome/browser/metrics/metrics_services_manager.h" 46 #include "chrome/browser/metrics/metrics_services_manager.h"
48 #include "chrome/browser/metrics/thread_watcher.h" 47 #include "chrome/browser/metrics/thread_watcher.h"
49 #include "chrome/browser/net/chrome_net_log_helper.h" 48 #include "chrome/browser/net/chrome_net_log_helper.h"
50 #include "chrome/browser/net/crl_set_fetcher.h" 49 #include "chrome/browser/net/crl_set_fetcher.h"
51 #include "chrome/browser/notifications/notification_ui_manager.h" 50 #include "chrome/browser/notifications/notification_ui_manager.h"
52 #include "chrome/browser/plugins/chrome_plugin_service_filter.h" 51 #include "chrome/browser/plugins/chrome_plugin_service_filter.h"
53 #include "chrome/browser/plugins/plugin_finder.h" 52 #include "chrome/browser/plugins/plugin_finder.h"
54 #include "chrome/browser/prefs/browser_prefs.h" 53 #include "chrome/browser/prefs/browser_prefs.h"
55 #include "chrome/browser/prefs/chrome_pref_service_factory.h" 54 #include "chrome/browser/prefs/chrome_pref_service_factory.h"
56 #include "chrome/browser/printing/background_printing_manager.h" 55 #include "chrome/browser/printing/background_printing_manager.h"
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 // http://crbug.com/318527. 528 // http://crbug.com/318527.
530 rundown_counter->TimedWait( 529 rundown_counter->TimedWait(
531 base::TimeDelta::FromSeconds(kEndSessionTimeoutSeconds)); 530 base::TimeDelta::FromSeconds(kEndSessionTimeoutSeconds));
532 #else 531 #else
533 NOTIMPLEMENTED(); 532 NOTIMPLEMENTED();
534 #endif 533 #endif
535 } 534 }
536 535
537 MetricsServicesManager* BrowserProcessImpl::GetMetricsServicesManager() { 536 MetricsServicesManager* BrowserProcessImpl::GetMetricsServicesManager() {
538 DCHECK(CalledOnValidThread()); 537 DCHECK(CalledOnValidThread());
539 if (!metrics_services_manager_) { 538 if (!metrics_services_manager_)
540 metrics_services_manager_.reset(new MetricsServicesManager(make_scoped_ptr( 539 metrics_services_manager_.reset(new MetricsServicesManager(local_state()));
541 new ChromeMetricsServicesManagerClient(local_state()))));
542 }
543 return metrics_services_manager_.get(); 540 return metrics_services_manager_.get();
544 } 541 }
545 542
546 metrics::MetricsService* BrowserProcessImpl::metrics_service() { 543 metrics::MetricsService* BrowserProcessImpl::metrics_service() {
547 DCHECK(CalledOnValidThread()); 544 DCHECK(CalledOnValidThread());
548 return GetMetricsServicesManager()->GetMetricsService(); 545 return GetMetricsServicesManager()->GetMetricsService();
549 } 546 }
550 547
551 rappor::RapporService* BrowserProcessImpl::rappor_service() { 548 rappor::RapporService* BrowserProcessImpl::rappor_service() {
552 DCHECK(CalledOnValidThread()); 549 DCHECK(CalledOnValidThread());
(...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after
1283 } 1280 }
1284 1281
1285 void BrowserProcessImpl::OnAutoupdateTimer() { 1282 void BrowserProcessImpl::OnAutoupdateTimer() {
1286 if (CanAutorestartForUpdate()) { 1283 if (CanAutorestartForUpdate()) {
1287 DLOG(WARNING) << "Detected update. Restarting browser."; 1284 DLOG(WARNING) << "Detected update. Restarting browser.";
1288 RestartBackgroundInstance(); 1285 RestartBackgroundInstance();
1289 } 1286 }
1290 } 1287 }
1291 1288
1292 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS) 1289 #endif // (defined(OS_WIN) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/metrics/chrome_metrics_service_accessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698