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

Side by Side Diff: chrome/browser/chrome_browser_main.h

Issue 472383002: Add ProcessPowerCollector to audit power information. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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
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 #ifndef CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ 5 #ifndef CHROME_BROWSER_CHROME_BROWSER_MAIN_H_
6 #define CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ 6 #define CHROME_BROWSER_CHROME_BROWSER_MAIN_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/metrics/field_trial.h" 10 #include "base/metrics/field_trial.h"
11 #include "base/tracked_objects.h" 11 #include "base/tracked_objects.h"
12 #include "chrome/browser/chrome_browser_field_trials.h" 12 #include "chrome/browser/chrome_browser_field_trials.h"
13 #include "chrome/browser/chrome_process_singleton.h" 13 #include "chrome/browser/chrome_process_singleton.h"
14 #include "chrome/browser/first_run/first_run.h" 14 #include "chrome/browser/first_run/first_run.h"
15 #include "chrome/browser/process_singleton.h" 15 #include "chrome/browser/process_singleton.h"
16 #include "chrome/browser/task_profiler/auto_tracking.h" 16 #include "chrome/browser/task_profiler/auto_tracking.h"
17 #include "chrome/browser/ui/startup/startup_browser_creator.h" 17 #include "chrome/browser/ui/startup/startup_browser_creator.h"
18 #include "content/public/browser/browser_main_parts.h" 18 #include "content/public/browser/browser_main_parts.h"
19 #include "content/public/common/main_function_params.h" 19 #include "content/public/common/main_function_params.h"
20 20
21 class BrowserProcessImpl; 21 class BrowserProcessImpl;
22 class ChromeBrowserMainExtraParts; 22 class ChromeBrowserMainExtraParts;
23 class FieldTrialSynchronizer; 23 class FieldTrialSynchronizer;
24 class MetricsService; 24 class MetricsService;
25 class PrefService; 25 class PrefService;
26 class ProcessPowerCollector;
26 class Profile; 27 class Profile;
27 class StartupBrowserCreator; 28 class StartupBrowserCreator;
28 class StartupTimeBomb; 29 class StartupTimeBomb;
29 class ShutdownWatcherHelper; 30 class ShutdownWatcherHelper;
30 class ThreeDAPIObserver; 31 class ThreeDAPIObserver;
31 32
32 namespace chrome_browser { 33 namespace chrome_browser {
33 // For use by ShowMissingLocaleMessageBox. 34 // For use by ShowMissingLocaleMessageBox.
34 #if defined(OS_WIN) 35 #if defined(OS_WIN)
35 extern const char kMissingLocaleDataTitle[]; 36 extern const char kMissingLocaleDataTitle[];
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 // instance. This MUST be done before main_message_loop, so that it is 144 // instance. This MUST be done before main_message_loop, so that it is
144 // destroyed after the main_message_loop. 145 // destroyed after the main_message_loop.
145 task_profiler::AutoTracking tracking_objects_; 146 task_profiler::AutoTracking tracking_objects_;
146 147
147 // Statistical testing infrastructure for the entire browser. NULL until 148 // Statistical testing infrastructure for the entire browser. NULL until
148 // SetupMetricsAndFieldTrials is called. 149 // SetupMetricsAndFieldTrials is called.
149 scoped_ptr<base::FieldTrialList> field_trial_list_; 150 scoped_ptr<base::FieldTrialList> field_trial_list_;
150 151
151 ChromeBrowserFieldTrials browser_field_trials_; 152 ChromeBrowserFieldTrials browser_field_trials_;
152 153
154 #if !defined(OS_ANDROID) && !defined(OS_IOS)
155 // A monitor for attributing power consumption to origins.
156 scoped_ptr<ProcessPowerCollector> process_power_collector_;
157 #endif
158
153 // Vector of additional ChromeBrowserMainExtraParts. 159 // Vector of additional ChromeBrowserMainExtraParts.
154 // Parts are deleted in the inverse order they are added. 160 // Parts are deleted in the inverse order they are added.
155 std::vector<ChromeBrowserMainExtraParts*> chrome_extra_parts_; 161 std::vector<ChromeBrowserMainExtraParts*> chrome_extra_parts_;
156 162
157 // Members initialized after / released before main_message_loop_ ------------ 163 // Members initialized after / released before main_message_loop_ ------------
158 164
159 scoped_ptr<BrowserProcessImpl> browser_process_; 165 scoped_ptr<BrowserProcessImpl> browser_process_;
160 scoped_refptr<chrome_browser_metrics::TrackingSynchronizer> 166 scoped_refptr<chrome_browser_metrics::TrackingSynchronizer>
161 tracking_synchronizer_; 167 tracking_synchronizer_;
162 #if !defined(OS_ANDROID) 168 #if !defined(OS_ANDROID)
(...skipping 24 matching lines...) Expand all
187 bool restart_last_session_; 193 bool restart_last_session_;
188 194
189 // Tests can set this to true to disable restricting cookie access in the 195 // Tests can set this to true to disable restricting cookie access in the
190 // network stack, as this can only be done once. 196 // network stack, as this can only be done once.
191 static bool disable_enforcing_cookie_policies_for_tests_; 197 static bool disable_enforcing_cookie_policies_for_tests_;
192 198
193 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts); 199 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts);
194 }; 200 };
195 201
196 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ 202 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698