OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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" |
(...skipping 13 matching lines...) Expand all Loading... |
24 class ShutdownWatcherHelper; | 24 class ShutdownWatcherHelper; |
25 class TranslateManager; | 25 class TranslateManager; |
26 struct MainFunctionParams; | 26 struct MainFunctionParams; |
27 | 27 |
28 namespace chrome_browser { | 28 namespace chrome_browser { |
29 // For use by ShowMissingLocaleMessageBox. | 29 // For use by ShowMissingLocaleMessageBox. |
30 extern const char kMissingLocaleDataTitle[]; | 30 extern const char kMissingLocaleDataTitle[]; |
31 extern const char kMissingLocaleDataMessage[]; | 31 extern const char kMissingLocaleDataMessage[]; |
32 } | 32 } |
33 | 33 |
| 34 namespace chrome_browser_metrics { |
| 35 class TrackingSynchronizer; |
| 36 } |
| 37 |
34 class ChromeBrowserMainParts : public content::BrowserMainParts { | 38 class ChromeBrowserMainParts : public content::BrowserMainParts { |
35 public: | 39 public: |
36 virtual ~ChromeBrowserMainParts(); | 40 virtual ~ChromeBrowserMainParts(); |
37 | 41 |
38 // Constructs metrics service and does related initialization, including | 42 // Constructs metrics service and does related initialization, including |
39 // creation of field trials. Call only after labs have been converted to | 43 // creation of field trials. Call only after labs have been converted to |
40 // switches. | 44 // switches. |
41 MetricsService* SetupMetricsAndFieldTrials(PrefService* local_state); | 45 MetricsService* SetupMetricsAndFieldTrials(PrefService* local_state); |
42 | 46 |
43 const MainFunctionParams& parameters() const { | 47 const MainFunctionParams& parameters() const { |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 #endif | 130 #endif |
127 | 131 |
128 // Statistical testing infrastructure for the entire browser. NULL until | 132 // Statistical testing infrastructure for the entire browser. NULL until |
129 // SetupMetricsAndFieldTrials is called. | 133 // SetupMetricsAndFieldTrials is called. |
130 scoped_ptr<base::FieldTrialList> field_trial_list_; | 134 scoped_ptr<base::FieldTrialList> field_trial_list_; |
131 | 135 |
132 // Members initialized after / released before main_message_loop_ ------------ | 136 // Members initialized after / released before main_message_loop_ ------------ |
133 | 137 |
134 scoped_ptr<BrowserProcessImpl> browser_process_; | 138 scoped_ptr<BrowserProcessImpl> browser_process_; |
135 scoped_refptr<HistogramSynchronizer> histogram_synchronizer_; | 139 scoped_refptr<HistogramSynchronizer> histogram_synchronizer_; |
| 140 scoped_refptr<chrome_browser_metrics::TrackingSynchronizer> |
| 141 tracking_synchronizer_; |
136 scoped_ptr<ProcessSingleton> process_singleton_; | 142 scoped_ptr<ProcessSingleton> process_singleton_; |
137 scoped_ptr<FirstRun::MasterPrefs> master_prefs_; | 143 scoped_ptr<FirstRun::MasterPrefs> master_prefs_; |
138 bool record_search_engine_; | 144 bool record_search_engine_; |
139 TranslateManager* translate_manager_; | 145 TranslateManager* translate_manager_; |
140 Profile* profile_; | 146 Profile* profile_; |
141 bool run_message_loop_; | 147 bool run_message_loop_; |
142 ProcessSingleton::NotifyResult notify_result_; | 148 ProcessSingleton::NotifyResult notify_result_; |
143 | 149 |
144 // Initialized in SetupMetricsAndFieldTrials. | 150 // Initialized in SetupMetricsAndFieldTrials. |
145 scoped_refptr<FieldTrialSynchronizer> field_trial_synchronizer_; | 151 scoped_refptr<FieldTrialSynchronizer> field_trial_synchronizer_; |
(...skipping 17 matching lines...) Expand all Loading... |
163 // Records the time from our process' startup to the present time in | 169 // Records the time from our process' startup to the present time in |
164 // the UMA histogram |metric_name|. | 170 // the UMA histogram |metric_name|. |
165 void RecordBrowserStartupTime(); | 171 void RecordBrowserStartupTime(); |
166 | 172 |
167 // Records a time value to an UMA histogram in the context of the | 173 // Records a time value to an UMA histogram in the context of the |
168 // PreReadExperiment field-trial. This also reports to the appropriate | 174 // PreReadExperiment field-trial. This also reports to the appropriate |
169 // sub-histogram (_PreRead(Enabled|Disabled)). | 175 // sub-histogram (_PreRead(Enabled|Disabled)). |
170 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); | 176 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); |
171 | 177 |
172 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ | 178 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ |
OLD | NEW |