| 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 25 matching lines...) Expand all Loading... |
| 36 } | 36 } |
| 37 | 37 |
| 38 namespace chrome_browser_metrics { | 38 namespace chrome_browser_metrics { |
| 39 class TrackingSynchronizer; | 39 class TrackingSynchronizer; |
| 40 } | 40 } |
| 41 | 41 |
| 42 namespace content { | 42 namespace content { |
| 43 struct MainFunctionParams; | 43 struct MainFunctionParams; |
| 44 } | 44 } |
| 45 | 45 |
| 46 namespace performance_monitor { |
| 47 class StartupTimer; |
| 48 } |
| 49 |
| 46 class ChromeBrowserMainParts : public content::BrowserMainParts { | 50 class ChromeBrowserMainParts : public content::BrowserMainParts { |
| 47 public: | 51 public: |
| 48 virtual ~ChromeBrowserMainParts(); | 52 virtual ~ChromeBrowserMainParts(); |
| 49 | 53 |
| 50 // Add additional ChromeBrowserMainExtraParts. | 54 // Add additional ChromeBrowserMainExtraParts. |
| 51 virtual void AddParts(ChromeBrowserMainExtraParts* parts); | 55 virtual void AddParts(ChromeBrowserMainExtraParts* parts); |
| 52 | 56 |
| 53 protected: | 57 protected: |
| 54 explicit ChromeBrowserMainParts( | 58 explicit ChromeBrowserMainParts( |
| 55 const content::MainFunctionParams& parameters); | 59 const content::MainFunctionParams& parameters); |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 int result_code_; | 174 int result_code_; |
| 171 | 175 |
| 172 // Create StartupTimeBomb object for watching jank during startup. | 176 // Create StartupTimeBomb object for watching jank during startup. |
| 173 scoped_ptr<StartupTimeBomb> startup_watcher_; | 177 scoped_ptr<StartupTimeBomb> startup_watcher_; |
| 174 | 178 |
| 175 // Create ShutdownWatcherHelper object for watching jank during shutdown. | 179 // Create ShutdownWatcherHelper object for watching jank during shutdown. |
| 176 // Please keep |shutdown_watcher| as the first object constructed, and hence | 180 // Please keep |shutdown_watcher| as the first object constructed, and hence |
| 177 // it is destroyed last. | 181 // it is destroyed last. |
| 178 scoped_ptr<ShutdownWatcherHelper> shutdown_watcher_; | 182 scoped_ptr<ShutdownWatcherHelper> shutdown_watcher_; |
| 179 | 183 |
| 184 // A timer to hold data regarding startup and session restore times for |
| 185 // PerformanceMonitor so that we don't have to start the entire |
| 186 // PerformanceMonitor at browser startup. |
| 187 scoped_ptr<performance_monitor::StartupTimer> startup_timer_; |
| 188 |
| 180 // Creating this object starts tracking the creation and deletion of Task | 189 // Creating this object starts tracking the creation and deletion of Task |
| 181 // instance. This MUST be done before main_message_loop, so that it is | 190 // instance. This MUST be done before main_message_loop, so that it is |
| 182 // destroyed after the main_message_loop. | 191 // destroyed after the main_message_loop. |
| 183 task_profiler::AutoTracking tracking_objects_; | 192 task_profiler::AutoTracking tracking_objects_; |
| 184 | 193 |
| 185 // Statistical testing infrastructure for the entire browser. NULL until | 194 // Statistical testing infrastructure for the entire browser. NULL until |
| 186 // SetupMetricsAndFieldTrials is called. | 195 // SetupMetricsAndFieldTrials is called. |
| 187 scoped_ptr<base::FieldTrialList> field_trial_list_; | 196 scoped_ptr<base::FieldTrialList> field_trial_list_; |
| 188 | 197 |
| 189 // Vector of additional ChromeBrowserMainExtraParts. | 198 // Vector of additional ChromeBrowserMainExtraParts. |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 // Records the time from our process' startup to the present time in | 251 // Records the time from our process' startup to the present time in |
| 243 // the Startup.BrowserMessageLoopStartTime UMA histogram. | 252 // the Startup.BrowserMessageLoopStartTime UMA histogram. |
| 244 void RecordBrowserStartupTime(); | 253 void RecordBrowserStartupTime(); |
| 245 | 254 |
| 246 // Records a time value to an UMA histogram in the context of the | 255 // Records a time value to an UMA histogram in the context of the |
| 247 // PreReadExperiment field-trial. This also reports to the appropriate | 256 // PreReadExperiment field-trial. This also reports to the appropriate |
| 248 // sub-histogram (_PreRead(Enabled|Disabled)). | 257 // sub-histogram (_PreRead(Enabled|Disabled)). |
| 249 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); | 258 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); |
| 250 | 259 |
| 251 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ | 260 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ |
| OLD | NEW |