Chromium Code Reviews| 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 // Displays a warning message that we can't find any locale data files. | |
| 55 virtual void ShowMissingLocaleMessageBox() = 0; | |
| 56 // Handles the --hide-icons and --show-icons command line options. | |
| 57 virtual int HandleIconsCommands() = 0; | |
| 58 // Check if there is any machine level Chrome installed. If so, handle it | |
| 59 // and return true. | |
| 60 virtual bool CheckMachineLevelInstall() = 0; | |
| 61 // Prepare localization, etc for handling crashes. | |
| 62 virtual void PrepareRestartOnCrashEnviroment() = 0; | |
|
jam
2011/10/20 18:01:19
the last three methods are Windows specific. can w
stevenjb
2011/10/21 22:25:49
OK, I wasn't sure if there were plans for these. M
| |
| 63 | |
| 52 private: | 64 private: |
| 65 int PreMainMessageLoopRunInternal(); | |
| 66 | |
| 53 // Methods for |EarlyInitialization()| --------------------------------------- | 67 // Methods for |EarlyInitialization()| --------------------------------------- |
| 54 | 68 |
| 55 // A/B test for the maximum number of persistent connections per host. | 69 // A/B test for the maximum number of persistent connections per host. |
| 56 void ConnectionFieldTrial(); | 70 void ConnectionFieldTrial(); |
| 57 | 71 |
| 58 // A/B test for determining a value for unused socket timeout. | 72 // A/B test for determining a value for unused socket timeout. |
| 59 void SocketTimeoutFieldTrial(); | 73 void SocketTimeoutFieldTrial(); |
| 60 | 74 |
| 61 // A/B test for the maximum number of connections per proxy server. | 75 // A/B test for the maximum number of connections per proxy server. |
| 62 void ProxyConnectionsFieldTrial(); | 76 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 | 145 // Records the conditions that can prevent Breakpad from generating and |
| 132 // sending crash reports. The presence of a Breakpad handler (after | 146 // sending crash reports. The presence of a Breakpad handler (after |
| 133 // attempting to initialize crash reporting) and the presence of a debugger | 147 // attempting to initialize crash reporting) and the presence of a debugger |
| 134 // are registered with the UMA metrics service. | 148 // are registered with the UMA metrics service. |
| 135 void RecordBreakpadStatusUMA(MetricsService* metrics); | 149 void RecordBreakpadStatusUMA(MetricsService* metrics); |
| 136 | 150 |
| 137 // Displays a warning message if some minimum level of OS support is not | 151 // Displays a warning message if some minimum level of OS support is not |
| 138 // present on the current platform. | 152 // present on the current platform. |
| 139 void WarnAboutMinimumSystemRequirements(); | 153 void WarnAboutMinimumSystemRequirements(); |
| 140 | 154 |
| 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 | 155 // Records the time from our process' startup to the present time in |
| 145 // the UMA histogram |metric_name|. | 156 // the UMA histogram |metric_name|. |
| 146 void RecordBrowserStartupTime(); | 157 void RecordBrowserStartupTime(); |
| 147 | 158 |
| 148 // Records a time value to an UMA histogram in the context of the | 159 // Records a time value to an UMA histogram in the context of the |
| 149 // PreReadExperiment field-trial. This also reports to the appropriate | 160 // PreReadExperiment field-trial. This also reports to the appropriate |
| 150 // sub-histogram (_PreRead(Enabled|Disabled)). | 161 // sub-histogram (_PreRead(Enabled|Disabled)). |
| 151 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); | 162 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); |
| 152 | 163 |
| 153 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ | 164 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ |
| OLD | NEW |