Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Side by Side Diff: chrome/browser/chrome_browser_main.h

Issue 10541019: Adding a field trial for testing --force-compositing-mode on 50% of (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 struct MainFunctionParams; 45 struct MainFunctionParams;
46 } 46 }
47 47
48 class ChromeBrowserMainParts : public content::BrowserMainParts { 48 class ChromeBrowserMainParts : public content::BrowserMainParts {
49 public: 49 public:
50 virtual ~ChromeBrowserMainParts(); 50 virtual ~ChromeBrowserMainParts();
51 51
52 // Add additional ChromeBrowserMainExtraParts. 52 // Add additional ChromeBrowserMainExtraParts.
53 virtual void AddParts(ChromeBrowserMainExtraParts* parts); 53 virtual void AddParts(ChromeBrowserMainExtraParts* parts);
54 54
55 static bool in_force_compositing_mode_trial() {
56 return in_force_compositing_mode_trial_;
57 }
Ilya Sherman 2012/06/06 22:31:51 Do we really need to cache this, rather than query
vangelis 2012/06/06 23:44:44 I removed the public method and replaced it with a
Ilya Sherman 2012/06/07 05:27:24 I'd prefer #2, as it only requires global /constan
58
55 protected: 59 protected:
56 explicit ChromeBrowserMainParts( 60 explicit ChromeBrowserMainParts(
57 const content::MainFunctionParams& parameters); 61 const content::MainFunctionParams& parameters);
58 62
59 // content::BrowserMainParts overrides. 63 // content::BrowserMainParts overrides.
60 // These are called in-order by content::BrowserMainLoop. 64 // These are called in-order by content::BrowserMainLoop.
61 // Each stage calls the same stages in any ChromeBrowserMainExtraParts added 65 // Each stage calls the same stages in any ChromeBrowserMainExtraParts added
62 // with AddParts() from ChromeContentBrowserClient::CreateBrowserMainParts. 66 // with AddParts() from ChromeContentBrowserClient::CreateBrowserMainParts.
63 virtual void PreEarlyInitialization() OVERRIDE; 67 virtual void PreEarlyInitialization() OVERRIDE;
64 virtual void PostEarlyInitialization() OVERRIDE; 68 virtual void PostEarlyInitialization() OVERRIDE;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // has on retention and general apps/webstore usage. 126 // has on retention and general apps/webstore usage.
123 void DefaultAppsFieldTrial(); 127 void DefaultAppsFieldTrial();
124 128
125 // A field trial to see what effects launching Chrome automatically on 129 // A field trial to see what effects launching Chrome automatically on
126 // computer startup has on retention and usage of Chrome. 130 // computer startup has on retention and usage of Chrome.
127 void AutoLaunchChromeFieldTrial(); 131 void AutoLaunchChromeFieldTrial();
128 132
129 // Field trial for testing domain bound certs. 133 // Field trial for testing domain bound certs.
130 void DomainBoundCertsFieldTrial(); 134 void DomainBoundCertsFieldTrial();
131 135
136 // Field trial for testing compositing on all pages.
137 void ForceCompositingModeFieldTrial();
138
132 // A collection of field trials intended to test the uniformity and 139 // A collection of field trials intended to test the uniformity and
133 // correctness of the field trial control, bucketing and reporting systems. 140 // correctness of the field trial control, bucketing and reporting systems.
134 void SetupUniformityFieldTrials(); 141 void SetupUniformityFieldTrials();
135 142
136 // Methods for |SetupMetricsAndFieldTrials()| -------------------------------- 143 // Methods for |SetupMetricsAndFieldTrials()| --------------------------------
137 144
138 // Constructs metrics service and does related initialization, including 145 // Constructs metrics service and does related initialization, including
139 // creation of field trials. Call only after labs have been converted to 146 // creation of field trials. Call only after labs have been converted to
140 // switches. 147 // switches.
141 void SetupMetricsAndFieldTrials(); 148 void SetupMetricsAndFieldTrials();
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 PrefService* local_state_; 215 PrefService* local_state_;
209 FilePath user_data_dir_; 216 FilePath user_data_dir_;
210 217
211 // Members needed across shutdown methods. 218 // Members needed across shutdown methods.
212 bool restart_last_session_; 219 bool restart_last_session_;
213 220
214 // Tests can set this to true to disable restricting cookie access in the 221 // Tests can set this to true to disable restricting cookie access in the
215 // network stack, as this can only be done once. 222 // network stack, as this can only be done once.
216 static bool disable_enforcing_cookie_policies_for_tests_; 223 static bool disable_enforcing_cookie_policies_for_tests_;
217 224
225 // Set to true if the force-compositing-mode trial has been enabled for
226 // this client.
227 static bool in_force_compositing_mode_trial_;
228
218 friend class BrowserMainTest; 229 friend class BrowserMainTest;
219 FRIEND_TEST_ALL_PREFIXES(BrowserMainTest, 230 FRIEND_TEST_ALL_PREFIXES(BrowserMainTest,
220 WarmConnectionFieldTrial_WarmestSocket); 231 WarmConnectionFieldTrial_WarmestSocket);
221 FRIEND_TEST_ALL_PREFIXES(BrowserMainTest, WarmConnectionFieldTrial_Random); 232 FRIEND_TEST_ALL_PREFIXES(BrowserMainTest, WarmConnectionFieldTrial_Random);
222 FRIEND_TEST_ALL_PREFIXES(BrowserMainTest, WarmConnectionFieldTrial_Invalid); 233 FRIEND_TEST_ALL_PREFIXES(BrowserMainTest, WarmConnectionFieldTrial_Invalid);
223 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts); 234 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserMainParts);
224 }; 235 };
225 236
226 // Records the conditions that can prevent Breakpad from generating and 237 // Records the conditions that can prevent Breakpad from generating and
227 // sending crash reports. The presence of a Breakpad handler (after 238 // sending crash reports. The presence of a Breakpad handler (after
228 // attempting to initialize crash reporting) and the presence of a debugger 239 // attempting to initialize crash reporting) and the presence of a debugger
229 // are registered with the UMA metrics service. 240 // are registered with the UMA metrics service.
230 void RecordBreakpadStatusUMA(MetricsService* metrics); 241 void RecordBreakpadStatusUMA(MetricsService* metrics);
231 242
232 // Displays a warning message if some minimum level of OS support is not 243 // Displays a warning message if some minimum level of OS support is not
233 // present on the current platform. 244 // present on the current platform.
234 void WarnAboutMinimumSystemRequirements(); 245 void WarnAboutMinimumSystemRequirements();
235 246
236 // Records the time from our process' startup to the present time in 247 // Records the time from our process' startup to the present time in
237 // the UMA histogram |metric_name|. 248 // the UMA histogram |metric_name|.
238 void RecordBrowserStartupTime(); 249 void RecordBrowserStartupTime();
239 250
240 // Records a time value to an UMA histogram in the context of the 251 // Records a time value to an UMA histogram in the context of the
241 // PreReadExperiment field-trial. This also reports to the appropriate 252 // PreReadExperiment field-trial. This also reports to the appropriate
242 // sub-histogram (_PreRead(Enabled|Disabled)). 253 // sub-histogram (_PreRead(Enabled|Disabled)).
243 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time); 254 void RecordPreReadExperimentTime(const char* name, base::TimeDelta time);
244 255
245 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_ 256 #endif // CHROME_BROWSER_CHROME_BROWSER_MAIN_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chrome_browser_main.cc » ('j') | chrome/browser/chrome_browser_main.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698