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 25 matching lines...) Expand all Loading... | |
36 // Constructs metrics service and does related initialization, including | 36 // Constructs metrics service and does related initialization, including |
37 // creation of field trials. Call only after labs have been converted to | 37 // creation of field trials. Call only after labs have been converted to |
38 // switches. | 38 // switches. |
39 MetricsService* SetupMetricsAndFieldTrials( | 39 MetricsService* SetupMetricsAndFieldTrials( |
40 const CommandLine& parsed_command_line, | 40 const CommandLine& parsed_command_line, |
41 PrefService* local_state); | 41 PrefService* local_state); |
42 | 42 |
43 protected: | 43 protected: |
44 explicit ChromeBrowserMainParts(const MainFunctionParams& parameters); | 44 explicit ChromeBrowserMainParts(const MainFunctionParams& parameters); |
45 | 45 |
46 // content::BrowserParts overrides | |
46 virtual void PreMainMessageLoopRun() OVERRIDE; | 47 virtual void PreMainMessageLoopRun() OVERRIDE; |
47 int PreMainMessageLoopRunInternal(); | 48 virtual void PostMainMessageLoopRun() OVERRIDE; |
49 | |
50 // content::BrowserMainParts overrides | |
48 virtual void MainMessageLoopRun() OVERRIDE; | 51 virtual void MainMessageLoopRun() OVERRIDE; |
49 virtual void PostMainMessageLoopRun() OVERRIDE; | |
50 virtual void ToolkitInitialized() OVERRIDE; | 52 virtual void ToolkitInitialized() OVERRIDE; |
51 | 53 |
54 // New virtual methods | |
DaveMoore
2011/10/19 21:31:18
Nit: this comment probably doesn't need to be here
| |
55 | |
56 // Displays a warning message that we can't find any locale data files. | |
57 virtual void ShowMissingLocaleMessageBox() = 0; | |
58 // Handles the --hide-icons and --show-icons command line options. | |
59 virtual int HandleIconsCommands() = 0; | |
60 // Check if there is any machine level Chrome installed. If so, handle it | |
61 // and return true. | |
62 virtual bool CheckMachineLevelInstall() = 0; | |
63 // Prepare localization, etc for handling crashes. | |
64 virtual void PrepareRestartOnCrashEnviroment() = 0; | |
65 | |
52 private: | 66 private: |
67 int PreMainMessageLoopRunInternal(); | |
68 | |
53 // Methods for |EarlyInitialization()| --------------------------------------- | 69 // Methods for |EarlyInitialization()| --------------------------------------- |
54 | 70 |
55 // A/B test for the maximum number of persistent connections per host. | 71 // A/B test for the maximum number of persistent connections per host. |
56 void ConnectionFieldTrial(); | 72 void ConnectionFieldTrial(); |
57 | 73 |
58 // A/B test for determining a value for unused socket timeout. | 74 // A/B test for determining a value for unused socket timeout. |
59 void SocketTimeoutFieldTrial(); | 75 void SocketTimeoutFieldTrial(); |
60 | 76 |
61 // A/B test for the maximum number of connections per proxy server. | 77 // A/B test for the maximum number of connections per proxy server. |
62 void ProxyConnectionsFieldTrial(); | 78 void ProxyConnectionsFieldTrial(); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
131 // Records the conditions that can prevent Breakpad from generating and | 147 // Records the conditions that can prevent Breakpad from generating and |
132 // sending crash reports. The presence of a Breakpad handler (after | 148 // sending crash reports. The presence of a Breakpad handler (after |
133 // attempting to initialize crash reporting) and the presence of a debugger | 149 // attempting to initialize crash reporting) and the presence of a debugger |
134 // are registered with the UMA metrics service. | 150 // are registered with the UMA metrics service. |
135 void RecordBreakpadStatusUMA(MetricsService* metrics); | 151 void RecordBreakpadStatusUMA(MetricsService* metrics); |
136 | 152 |
137 // Displays a warning message if some minimum level of OS support is not | 153 // Displays a warning message if some minimum level of OS support is not |
138 // present on the current platform. | 154 // present on the current platform. |
139 void WarnAboutMinimumSystemRequirements(); | 155 void WarnAboutMinimumSystemRequirements(); |
140 | 156 |
141 // Displays a warning message that we can't find any locale data files. | |
142 void ShowMissingLocaleMessageBox(); | |
143 | |
144 // Records the time from our process' startup to the present time in | 157 // Records the time from our process' startup to the present time in |
145 // the UMA histogram |metric_name|. | 158 // the UMA histogram |metric_name|. |
146 void RecordBrowserStartupTime(); | 159 void RecordBrowserStartupTime(); |
147 | 160 |
148 // Records a time value to an UMA histogram in the context of the | 161 // Records a time value to an UMA histogram in the context of the |
149 // PreReadExperiment field-trial. This also reports to the appropriate | 162 // PreReadExperiment field-trial. This also reports to the appropriate |
150 // sub-histogram (_PreRead(Enabled|Disabled)). | 163 // sub-histogram (_PreRead(Enabled|Disabled)). |
151 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); | 164 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); |
152 | 165 |
153 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ | 166 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ |
OLD | NEW |