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 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 } | 37 } |
38 | 38 |
39 namespace chrome_browser_metrics { | 39 namespace chrome_browser_metrics { |
40 class TrackingSynchronizer; | 40 class TrackingSynchronizer; |
41 } | 41 } |
42 | 42 |
43 namespace content { | 43 namespace content { |
44 struct MainFunctionParams; | 44 struct MainFunctionParams; |
45 } | 45 } |
46 | 46 |
| 47 namespace performance_monitor { |
| 48 class StartupTimer; |
| 49 } |
| 50 |
47 class ChromeBrowserMainParts : public content::BrowserMainParts { | 51 class ChromeBrowserMainParts : public content::BrowserMainParts { |
48 public: | 52 public: |
49 virtual ~ChromeBrowserMainParts(); | 53 virtual ~ChromeBrowserMainParts(); |
50 | 54 |
51 // Add additional ChromeBrowserMainExtraParts. | 55 // Add additional ChromeBrowserMainExtraParts. |
52 virtual void AddParts(ChromeBrowserMainExtraParts* parts); | 56 virtual void AddParts(ChromeBrowserMainExtraParts* parts); |
53 | 57 |
54 protected: | 58 protected: |
55 explicit ChromeBrowserMainParts( | 59 explicit ChromeBrowserMainParts( |
56 const content::MainFunctionParams& parameters); | 60 const content::MainFunctionParams& parameters); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 int result_code_; | 129 int result_code_; |
126 | 130 |
127 // Create StartupTimeBomb object for watching jank during startup. | 131 // Create StartupTimeBomb object for watching jank during startup. |
128 scoped_ptr<StartupTimeBomb> startup_watcher_; | 132 scoped_ptr<StartupTimeBomb> startup_watcher_; |
129 | 133 |
130 // Create ShutdownWatcherHelper object for watching jank during shutdown. | 134 // Create ShutdownWatcherHelper object for watching jank during shutdown. |
131 // Please keep |shutdown_watcher| as the first object constructed, and hence | 135 // Please keep |shutdown_watcher| as the first object constructed, and hence |
132 // it is destroyed last. | 136 // it is destroyed last. |
133 scoped_ptr<ShutdownWatcherHelper> shutdown_watcher_; | 137 scoped_ptr<ShutdownWatcherHelper> shutdown_watcher_; |
134 | 138 |
| 139 // A timer to hold data regarding startup and session restore times for |
| 140 // PerformanceMonitor so that we don't have to start the entire |
| 141 // PerformanceMonitor at browser startup. |
| 142 scoped_ptr<performance_monitor::StartupTimer> startup_timer_; |
| 143 |
135 // Creating this object starts tracking the creation and deletion of Task | 144 // Creating this object starts tracking the creation and deletion of Task |
136 // instance. This MUST be done before main_message_loop, so that it is | 145 // instance. This MUST be done before main_message_loop, so that it is |
137 // destroyed after the main_message_loop. | 146 // destroyed after the main_message_loop. |
138 task_profiler::AutoTracking tracking_objects_; | 147 task_profiler::AutoTracking tracking_objects_; |
139 | 148 |
140 // Statistical testing infrastructure for the entire browser. NULL until | 149 // Statistical testing infrastructure for the entire browser. NULL until |
141 // SetupMetricsAndFieldTrials is called. | 150 // SetupMetricsAndFieldTrials is called. |
142 scoped_ptr<base::FieldTrialList> field_trial_list_; | 151 scoped_ptr<base::FieldTrialList> field_trial_list_; |
143 | 152 |
144 ChromeBrowserFieldTrials browser_field_trials_; | 153 ChromeBrowserFieldTrials browser_field_trials_; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 // Records the time from our process' startup to the present time in | 208 // Records the time from our process' startup to the present time in |
200 // the Startup.BrowserMessageLoopStartTime UMA histogram. | 209 // the Startup.BrowserMessageLoopStartTime UMA histogram. |
201 void RecordBrowserStartupTime(); | 210 void RecordBrowserStartupTime(); |
202 | 211 |
203 // Records a time value to an UMA histogram in the context of the | 212 // Records a time value to an UMA histogram in the context of the |
204 // PreReadExperiment field-trial. This also reports to the appropriate | 213 // PreReadExperiment field-trial. This also reports to the appropriate |
205 // sub-histogram (_PreRead(Enabled|Disabled)). | 214 // sub-histogram (_PreRead(Enabled|Disabled)). |
206 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); | 215 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); |
207 | 216 |
208 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ | 217 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ |
OLD | NEW |