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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 scoped_ptr<StartupTimeBomb> startup_watcher_; | 159 scoped_ptr<StartupTimeBomb> startup_watcher_; |
159 | 160 |
160 // Create ShutdownWatcherHelper object for watching jank during shutdown. | 161 // Create ShutdownWatcherHelper object for watching jank during shutdown. |
161 // Please keep |shutdown_watcher| as the first object constructed, and hence | 162 // Please keep |shutdown_watcher| as the first object constructed, and hence |
162 // it is destroyed last. | 163 // it is destroyed last. |
163 scoped_ptr<ShutdownWatcherHelper> shutdown_watcher_; | 164 scoped_ptr<ShutdownWatcherHelper> shutdown_watcher_; |
164 | 165 |
165 // Creating this object starts tracking the creation and deletion of Task | 166 // Creating this object starts tracking the creation and deletion of Task |
166 // instance. This MUST be done before main_message_loop, so that it is | 167 // instance. This MUST be done before main_message_loop, so that it is |
167 // destroyed after the main_message_loop. | 168 // destroyed after the main_message_loop. |
168 tracked_objects::AutoTracking tracking_objects_; | 169 task_profiler::AutoTracking tracking_objects_; |
169 | 170 |
170 // Statistical testing infrastructure for the entire browser. NULL until | 171 // Statistical testing infrastructure for the entire browser. NULL until |
171 // SetupMetricsAndFieldTrials is called. | 172 // SetupMetricsAndFieldTrials is called. |
172 scoped_ptr<base::FieldTrialList> field_trial_list_; | 173 scoped_ptr<base::FieldTrialList> field_trial_list_; |
173 | 174 |
174 // Vector of additional ChromeBrowserMainExtraParts. | 175 // Vector of additional ChromeBrowserMainExtraParts. |
175 // Parts are deleted in the inverse order they are added. | 176 // Parts are deleted in the inverse order they are added. |
176 std::vector<ChromeBrowserMainExtraParts*> chrome_extra_parts_; | 177 std::vector<ChromeBrowserMainExtraParts*> chrome_extra_parts_; |
177 | 178 |
178 // Members initialized after / released before main_message_loop_ ------------ | 179 // Members initialized after / released before main_message_loop_ ------------ |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 // Records the time from our process' startup to the present time in | 225 // Records the time from our process' startup to the present time in |
225 // the UMA histogram |metric_name|. | 226 // the UMA histogram |metric_name|. |
226 void RecordBrowserStartupTime(); | 227 void RecordBrowserStartupTime(); |
227 | 228 |
228 // Records a time value to an UMA histogram in the context of the | 229 // Records a time value to an UMA histogram in the context of the |
229 // PreReadExperiment field-trial. This also reports to the appropriate | 230 // PreReadExperiment field-trial. This also reports to the appropriate |
230 // sub-histogram (_PreRead(Enabled|Disabled)). | 231 // sub-histogram (_PreRead(Enabled|Disabled)). |
231 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); | 232 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); |
232 | 233 |
233 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ | 234 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ |
OLD | NEW |