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 <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
95 } | 95 } |
96 const base::FilePath& user_data_dir() const { | 96 const base::FilePath& user_data_dir() const { |
97 return user_data_dir_; | 97 return user_data_dir_; |
98 } | 98 } |
99 | 99 |
100 Profile* profile() { return profile_; } | 100 Profile* profile() { return profile_; } |
101 | 101 |
102 const PrefService* local_state() const { return local_state_; } | 102 const PrefService* local_state() const { return local_state_; } |
103 | 103 |
104 private: | 104 private: |
105 // Methods for |SetupMetricsAndFieldTrials()| -------------------------------- | 105 // Methods for |SetupFieldTrials()| and |SetupMetrics()|---------------------- |
Alexei Svitkine (slow)
2016/09/15 21:50:57
I would just remove this line and the blank line b
robliao
2016/09/16 14:07:07
Done.
| |
106 | 106 |
107 // Constructs metrics service and does related initialization, including | 107 // Constructs metrics service and does related initialization, including |
Alexei Svitkine (slow)
2016/09/15 21:50:57
Remove "Constructs metrics service"
robliao
2016/09/16 14:07:07
Done.
| |
108 // creation of field trials. Call only after labs have been converted to | 108 // creation of field trials. Call only after about:flags have been converted |
109 // switches. | 109 // to switches. |
110 void SetupMetricsAndFieldTrials(); | 110 // Sets up the field trials and related initialization. Call only after |
111 // about:flags have been converted to switches. | |
112 void SetupFieldTrials(); | |
113 | |
114 // Constructs the metrics service and initializes metrics recording. | |
115 void SetupMetrics(); | |
111 | 116 |
112 // Starts recording of metrics. This can only be called after we have a file | 117 // Starts recording of metrics. This can only be called after we have a file |
113 // thread. | 118 // thread. |
114 void StartMetricsRecording(); | 119 void StartMetricsRecording(); |
115 | 120 |
116 // Record time from process startup to present time in an UMA histogram. | 121 // Record time from process startup to present time in an UMA histogram. |
117 void RecordBrowserStartupTime(); | 122 void RecordBrowserStartupTime(); |
118 | 123 |
119 // Reads origin trial policy data from local state and configures command line | 124 // Reads origin trial policy data from local state and configures command line |
120 // for child processes. | 125 // for child processes. |
(...skipping 11 matching lines...) Expand all Loading... | |
132 int result_code_; | 137 int result_code_; |
133 | 138 |
134 // Create StartupTimeBomb object for watching jank during startup. | 139 // Create StartupTimeBomb object for watching jank during startup. |
135 std::unique_ptr<StartupTimeBomb> startup_watcher_; | 140 std::unique_ptr<StartupTimeBomb> startup_watcher_; |
136 | 141 |
137 // Create ShutdownWatcherHelper object for watching jank during shutdown. | 142 // Create ShutdownWatcherHelper object for watching jank during shutdown. |
138 // Please keep |shutdown_watcher| as the first object constructed, and hence | 143 // Please keep |shutdown_watcher| as the first object constructed, and hence |
139 // it is destroyed last. | 144 // it is destroyed last. |
140 std::unique_ptr<ShutdownWatcherHelper> shutdown_watcher_; | 145 std::unique_ptr<ShutdownWatcherHelper> shutdown_watcher_; |
141 | 146 |
142 // Statistical testing infrastructure for the entire browser. NULL until | 147 // Statistical testing infrastructure for the entire browser. NULL until |
Alexei Svitkine (slow)
2016/09/15 21:50:57
Nit: NULL -> Null
robliao
2016/09/16 14:07:07
Went with nullptr.
| |
143 // SetupMetricsAndFieldTrials is called. | 148 // |SetupFieldTrials()| is called. |
144 std::unique_ptr<base::FieldTrialList> field_trial_list_; | 149 std::unique_ptr<base::FieldTrialList> field_trial_list_; |
145 | 150 |
146 ChromeBrowserFieldTrials browser_field_trials_; | 151 ChromeBrowserFieldTrials browser_field_trials_; |
147 | 152 |
148 #if !defined(OS_ANDROID) && !defined(OS_IOS) | 153 #if !defined(OS_ANDROID) && !defined(OS_IOS) |
149 // A monitor for attributing power consumption to origins. | 154 // A monitor for attributing power consumption to origins. |
150 std::unique_ptr<ProcessPowerCollector> process_power_collector_; | 155 std::unique_ptr<ProcessPowerCollector> process_power_collector_; |
151 | 156 |
152 std::unique_ptr<WebUsbDetector> web_usb_detector_; | 157 std::unique_ptr<WebUsbDetector> web_usb_detector_; |
153 #endif | 158 #endif |
(...skipping 29 matching lines...) Expand all Loading... | |
183 ProcessSingleton::PROCESS_NONE; | 188 ProcessSingleton::PROCESS_NONE; |
184 | 189 |
185 // Members needed across shutdown methods. | 190 // Members needed across shutdown methods. |
186 bool restart_last_session_ = false; | 191 bool restart_last_session_ = false; |
187 #endif | 192 #endif |
188 | 193 |
189 Profile* profile_; | 194 Profile* profile_; |
190 bool run_message_loop_; | 195 bool run_message_loop_; |
191 std::unique_ptr<ThreeDAPIObserver> three_d_observer_; | 196 std::unique_ptr<ThreeDAPIObserver> three_d_observer_; |
192 | 197 |
193 // Initialized in SetupMetricsAndFieldTrials. | 198 // Initialized in |SetupFieldTrials()|. |
194 scoped_refptr<FieldTrialSynchronizer> field_trial_synchronizer_; | 199 scoped_refptr<FieldTrialSynchronizer> field_trial_synchronizer_; |
195 | 200 |
196 // Members initialized in PreMainMessageLoopRun, needed in | 201 // Members initialized in PreMainMessageLoopRun, needed in |
197 // PreMainMessageLoopRunThreadsCreated. | 202 // PreMainMessageLoopRunThreadsCreated. |
198 PrefService* local_state_; | 203 PrefService* local_state_; |
199 base::FilePath user_data_dir_; | 204 base::FilePath user_data_dir_; |
200 | 205 |
201 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts); | 206 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts); |
202 }; | 207 }; |
203 | 208 |
204 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ | 209 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ |
OLD | NEW |