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 #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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 // Members initialized in PreMainMessageLoopRun, needed in | 204 // Members initialized in PreMainMessageLoopRun, needed in |
205 // PreMainMessageLoopRunThreadsCreated. | 205 // PreMainMessageLoopRunThreadsCreated. |
206 bool is_first_run_; | 206 bool is_first_run_; |
207 bool first_run_ui_bypass_; | 207 bool first_run_ui_bypass_; |
208 PrefService* local_state_; | 208 PrefService* local_state_; |
209 FilePath user_data_dir_; | 209 FilePath user_data_dir_; |
210 | 210 |
211 // Members needed across shutdown methods. | 211 // Members needed across shutdown methods. |
212 bool restart_last_session_; | 212 bool restart_last_session_; |
213 | 213 |
| 214 // Tests can set this to true to disable restricting cookie access in the |
| 215 // network stack, as this can only be done once. |
| 216 static bool disable_enforcing_cookie_policies_for_tests_; |
| 217 |
| 218 friend class BrowserMainTest; |
214 FRIEND_TEST_ALL_PREFIXES(BrowserMainTest, | 219 FRIEND_TEST_ALL_PREFIXES(BrowserMainTest, |
215 WarmConnectionFieldTrial_WarmestSocket); | 220 WarmConnectionFieldTrial_WarmestSocket); |
216 FRIEND_TEST_ALL_PREFIXES(BrowserMainTest, WarmConnectionFieldTrial_Random); | 221 FRIEND_TEST_ALL_PREFIXES(BrowserMainTest, WarmConnectionFieldTrial_Random); |
217 FRIEND_TEST_ALL_PREFIXES(BrowserMainTest, WarmConnectionFieldTrial_Invalid); | 222 FRIEND_TEST_ALL_PREFIXES(BrowserMainTest, WarmConnectionFieldTrial_Invalid); |
218 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts); | 223 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts); |
219 }; | 224 }; |
220 | 225 |
221 // Records the conditions that can prevent Breakpad from generating and | 226 // Records the conditions that can prevent Breakpad from generating and |
222 // sending crash reports. The presence of a Breakpad handler (after | 227 // sending crash reports. The presence of a Breakpad handler (after |
223 // attempting to initialize crash reporting) and the presence of a debugger | 228 // attempting to initialize crash reporting) and the presence of a debugger |
224 // are registered with the UMA metrics service. | 229 // are registered with the UMA metrics service. |
225 void RecordBreakpadStatusUMA(MetricsService* metrics); | 230 void RecordBreakpadStatusUMA(MetricsService* metrics); |
226 | 231 |
227 // Displays a warning message if some minimum level of OS support is not | 232 // Displays a warning message if some minimum level of OS support is not |
228 // present on the current platform. | 233 // present on the current platform. |
229 void WarnAboutMinimumSystemRequirements(); | 234 void WarnAboutMinimumSystemRequirements(); |
230 | 235 |
231 // Records the time from our process' startup to the present time in | 236 // Records the time from our process' startup to the present time in |
232 // the UMA histogram |metric_name|. | 237 // the UMA histogram |metric_name|. |
233 void RecordBrowserStartupTime(); | 238 void RecordBrowserStartupTime(); |
234 | 239 |
235 // Records a time value to an UMA histogram in the context of the | 240 // Records a time value to an UMA histogram in the context of the |
236 // PreReadExperiment field-trial. This also reports to the appropriate | 241 // PreReadExperiment field-trial. This also reports to the appropriate |
237 // sub-histogram (_PreRead(Enabled|Disabled)). | 242 // sub-histogram (_PreRead(Enabled|Disabled)). |
238 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); | 243 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); |
239 | 244 |
240 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ | 245 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ |
OLD | NEW |