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 #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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "base/memory/scoped_vector.h" | 12 #include "base/memory/scoped_vector.h" |
13 #include "base/metrics/field_trial.h" | 13 #include "base/metrics/field_trial.h" |
14 #include "base/tracked_objects.h" | 14 #include "base/tracked_objects.h" |
15 #include "chrome/browser/first_run/first_run.h" | 15 #include "chrome/browser/first_run/first_run.h" |
16 #include "chrome/browser/process_singleton.h" | 16 #include "chrome/browser/process_singleton.h" |
| 17 #include "chrome/browser/task_profiler/auto_tracking.h" |
17 #include "chrome/browser/ui/browser_init.h" | 18 #include "chrome/browser/ui/browser_init.h" |
18 #include "content/public/browser/browser_main_parts.h" | 19 #include "content/public/browser/browser_main_parts.h" |
19 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
20 | 21 |
21 class BrowserInit; | 22 class BrowserInit; |
22 class BrowserProcessImpl; | 23 class BrowserProcessImpl; |
23 class ChromeBrowserMainExtraParts; | 24 class ChromeBrowserMainExtraParts; |
24 class FieldTrialSynchronizer; | 25 class FieldTrialSynchronizer; |
25 class HistogramSynchronizer; | 26 class HistogramSynchronizer; |
26 class MetricsService; | 27 class MetricsService; |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 scoped_ptr<StartupTimeBomb> startup_watcher_; | 154 scoped_ptr<StartupTimeBomb> startup_watcher_; |
154 | 155 |
155 // Create ShutdownWatcherHelper object for watching jank during shutdown. | 156 // Create ShutdownWatcherHelper object for watching jank during shutdown. |
156 // Please keep |shutdown_watcher| as the first object constructed, and hence | 157 // Please keep |shutdown_watcher| as the first object constructed, and hence |
157 // it is destroyed last. | 158 // it is destroyed last. |
158 scoped_ptr<ShutdownWatcherHelper> shutdown_watcher_; | 159 scoped_ptr<ShutdownWatcherHelper> shutdown_watcher_; |
159 | 160 |
160 // Creating this object starts tracking the creation and deletion of Task | 161 // Creating this object starts tracking the creation and deletion of Task |
161 // instance. This MUST be done before main_message_loop, so that it is | 162 // instance. This MUST be done before main_message_loop, so that it is |
162 // destroyed after the main_message_loop. | 163 // destroyed after the main_message_loop. |
163 tracked_objects::AutoTracking tracking_objects_; | 164 task_profiler::AutoTracking tracking_objects_; |
164 | 165 |
165 // Statistical testing infrastructure for the entire browser. NULL until | 166 // Statistical testing infrastructure for the entire browser. NULL until |
166 // SetupMetricsAndFieldTrials is called. | 167 // SetupMetricsAndFieldTrials is called. |
167 scoped_ptr<base::FieldTrialList> field_trial_list_; | 168 scoped_ptr<base::FieldTrialList> field_trial_list_; |
168 | 169 |
169 // Vector of additional ChromeBrowserMainExtraParts. | 170 // Vector of additional ChromeBrowserMainExtraParts. |
170 // Parts are deleted in the inverse order they are added. | 171 // Parts are deleted in the inverse order they are added. |
171 std::vector<ChromeBrowserMainExtraParts*> chrome_extra_parts_; | 172 std::vector<ChromeBrowserMainExtraParts*> chrome_extra_parts_; |
172 | 173 |
173 // Members initialized after / released before main_message_loop_ ------------ | 174 // Members initialized after / released before main_message_loop_ ------------ |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 // Records the time from our process' startup to the present time in | 219 // Records the time from our process' startup to the present time in |
219 // the UMA histogram |metric_name|. | 220 // the UMA histogram |metric_name|. |
220 void RecordBrowserStartupTime(); | 221 void RecordBrowserStartupTime(); |
221 | 222 |
222 // Records a time value to an UMA histogram in the context of the | 223 // Records a time value to an UMA histogram in the context of the |
223 // PreReadExperiment field-trial. This also reports to the appropriate | 224 // PreReadExperiment field-trial. This also reports to the appropriate |
224 // sub-histogram (_PreRead(Enabled|Disabled)). | 225 // sub-histogram (_PreRead(Enabled|Disabled)). |
225 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); | 226 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); |
226 | 227 |
227 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ | 228 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ |
OLD | NEW |