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

Side by Side Diff: chrome/browser/chromeos/chrome_browser_main_chromeos.cc

Issue 289303003: [Metrics] Move ExternalMetrics ownership to ChromeBrowserMainPartsChromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/chromeos/chrome_browser_main_chromeos.h" 5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/ash_switches.h" 10 #include "ash/ash_switches.h"
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 // available. 695 // available.
696 idle_action_warning_observer_.reset(new IdleActionWarningObserver()); 696 idle_action_warning_observer_.reset(new IdleActionWarningObserver());
697 697
698 ChromeBrowserMainPartsLinux::PostProfileInit(); 698 ChromeBrowserMainPartsLinux::PostProfileInit();
699 } 699 }
700 700
701 void ChromeBrowserMainPartsChromeos::PreBrowserStart() { 701 void ChromeBrowserMainPartsChromeos::PreBrowserStart() {
702 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() 702 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun()
703 // -- just before MetricsService::LogNeedForCleanShutdown(). 703 // -- just before MetricsService::LogNeedForCleanShutdown().
704 704
705 g_browser_process->metrics_service()->StartExternalMetrics(); 705 // Start the external metrics service, which collects metrics from Chrome OS
706 // and passes them to the browser process.
707 external_metrics_ = new chromeos::ExternalMetrics;
708 external_metrics_->Start();
706 709
707 #if defined(USE_X11) 710 #if defined(USE_X11)
708 // Listen for system key events so that the user will be able to adjust the 711 // Listen for system key events so that the user will be able to adjust the
709 // volume on the login screen, if Chrome is running on Chrome OS 712 // volume on the login screen, if Chrome is running on Chrome OS
710 // (i.e. not Linux desktop), and in non-test mode. 713 // (i.e. not Linux desktop), and in non-test mode.
711 // Note: SystemKeyEventListener depends on the DBus thread. 714 // Note: SystemKeyEventListener depends on the DBus thread.
712 if (base::SysInfo::IsRunningOnChromeOS() && 715 if (base::SysInfo::IsRunningOnChromeOS() &&
713 !parameters().ui_task) { // ui_task is non-NULL when running tests. 716 !parameters().ui_task) { // ui_task is non-NULL when running tests.
714 SystemKeyEventListener::Initialize(); 717 SystemKeyEventListener::Initialize();
715 } 718 }
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 // Destroy DBus services immediately after threads are stopped. 860 // Destroy DBus services immediately after threads are stopped.
858 dbus_services_.reset(); 861 dbus_services_.reset();
859 862
860 ChromeBrowserMainPartsLinux::PostDestroyThreads(); 863 ChromeBrowserMainPartsLinux::PostDestroyThreads();
861 864
862 // Destroy DeviceSettingsService after g_browser_process. 865 // Destroy DeviceSettingsService after g_browser_process.
863 DeviceSettingsService::Shutdown(); 866 DeviceSettingsService::Shutdown();
864 } 867 }
865 868
866 } // namespace chromeos 869 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/chrome_browser_main_chromeos.h ('k') | chrome/browser/metrics/metrics_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698