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" |
11 #include "base/memory/scoped_vector.h" | 11 #include "base/memory/scoped_vector.h" |
12 #include "base/metrics/field_trial.h" | 12 #include "base/metrics/field_trial.h" |
13 #include "base/tracked_objects.h" | 13 #include "base/tracked_objects.h" |
14 #include "chrome/browser/chrome_browser_field_trials.h" | 14 #include "chrome/browser/chrome_browser_field_trials.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/task_profiler/auto_tracking.h" |
18 #include "chrome/browser/ui/startup/startup_browser_creator.h" | 18 #include "chrome/browser/ui/startup/startup_browser_creator.h" |
19 #include "content/public/browser/browser_main_parts.h" | 19 #include "content/public/browser/browser_main_parts.h" |
20 #include "content/public/browser/browser_thread.h" | |
21 | 20 |
22 class BrowserProcessImpl; | 21 class BrowserProcessImpl; |
23 class ChromeBrowserMainExtraParts; | 22 class ChromeBrowserMainExtraParts; |
24 class FieldTrialSynchronizer; | 23 class FieldTrialSynchronizer; |
25 class MetricsService; | 24 class MetricsService; |
26 class PrefService; | 25 class PrefService; |
27 class Profile; | 26 class Profile; |
28 class StartupBrowserCreator; | 27 class StartupBrowserCreator; |
29 class StartupTimeBomb; | 28 class StartupTimeBomb; |
30 class ShutdownWatcherHelper; | 29 class ShutdownWatcherHelper; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 } | 96 } |
98 const CommandLine& parsed_command_line() const { | 97 const CommandLine& parsed_command_line() const { |
99 return parsed_command_line_; | 98 return parsed_command_line_; |
100 } | 99 } |
101 | 100 |
102 Profile* profile() { return profile_; } | 101 Profile* profile() { return profile_; } |
103 | 102 |
104 const PrefService* local_state() const { return local_state_; } | 103 const PrefService* local_state() const { return local_state_; } |
105 | 104 |
106 private: | 105 private: |
107 | |
108 // Methods for |SetupMetricsAndFieldTrials()| -------------------------------- | 106 // Methods for |SetupMetricsAndFieldTrials()| -------------------------------- |
109 | 107 |
110 // Constructs metrics service and does related initialization, including | 108 // Constructs metrics service and does related initialization, including |
111 // creation of field trials. Call only after labs have been converted to | 109 // creation of field trials. Call only after labs have been converted to |
112 // switches. | 110 // switches. |
113 void SetupMetricsAndFieldTrials(); | 111 void SetupMetricsAndFieldTrials(); |
114 | 112 |
115 // Starts recording of metrics. This can only be called after we have a file | 113 // Starts recording of metrics. This can only be called after we have a file |
116 // thread. | 114 // thread. |
117 void StartMetricsRecording(); | 115 void StartMetricsRecording(); |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 // Records the time from our process' startup to the present time in | 213 // Records the time from our process' startup to the present time in |
216 // the Startup.BrowserMessageLoopStartTime UMA histogram. | 214 // the Startup.BrowserMessageLoopStartTime UMA histogram. |
217 void RecordBrowserStartupTime(); | 215 void RecordBrowserStartupTime(); |
218 | 216 |
219 // Records a time value to an UMA histogram in the context of the | 217 // Records a time value to an UMA histogram in the context of the |
220 // PreReadExperiment field-trial. This also reports to the appropriate | 218 // PreReadExperiment field-trial. This also reports to the appropriate |
221 // sub-histogram (_PreRead(Enabled|Disabled)). | 219 // sub-histogram (_PreRead(Enabled|Disabled)). |
222 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); | 220 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); |
223 | 221 |
224 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ | 222 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ |
OLD | NEW |