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_FIELD_TRIALS_H_ | 5 #ifndef CHROME_BROWSER_CHROME_BROWSER_FIELD_TRIALS_H_ |
6 #define CHROME_BROWSER_CHROME_BROWSER_FIELD_TRIALS_H_ | 6 #define CHROME_BROWSER_CHROME_BROWSER_FIELD_TRIALS_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/gtest_prod_util.h" | |
11 #include "base/time.h" | 10 #include "base/time.h" |
12 | 11 |
13 class ChromeBrowserFieldTrials { | 12 class ChromeBrowserFieldTrials { |
14 public: | 13 public: |
15 explicit ChromeBrowserFieldTrials(const CommandLine& command_line); | 14 explicit ChromeBrowserFieldTrials(const CommandLine& command_line); |
16 ~ChromeBrowserFieldTrials(); | 15 ~ChromeBrowserFieldTrials(); |
17 | 16 |
18 // Called by the browser main sequence to set up Field Trials for this client. | 17 // Called by the browser main sequence to set up Field Trials for this client. |
19 // |install_time| is the time this browser was installed (or the last time | 18 // |install_time| is the time this browser was installed (or the last time |
20 // prefs was reset). |install_time| is used by trials that are only created | 19 // prefs was reset). |install_time| is used by trials that are only created |
21 // for new installs of the browser. | 20 // for new installs of the browser. |
22 void SetupFieldTrials(const base::Time& install_time); | 21 void SetupFieldTrials(const base::Time& install_time); |
23 | 22 |
24 private: | 23 private: |
25 FRIEND_TEST_ALL_PREFIXES(BrowserMainTest, | |
26 WarmConnectionFieldTrial_WarmestSocket); | |
27 FRIEND_TEST_ALL_PREFIXES(BrowserMainTest, WarmConnectionFieldTrial_Random); | |
28 FRIEND_TEST_ALL_PREFIXES(BrowserMainTest, WarmConnectionFieldTrial_Invalid); | |
29 | |
30 // Sets up common desktop-only field trials. | 24 // Sets up common desktop-only field trials. |
31 // Add an invocation of your field trial init function to this method, or to | 25 // Add an invocation of your field trial init function to this method, or to |
32 // SetupFieldTrials if it is for all platforms. | 26 // SetupFieldTrials if it is for all platforms. |
33 void SetupDesktopFieldTrials(); | 27 void SetupDesktopFieldTrials(); |
34 | 28 |
35 // A/B test for spdy when --use-spdy not set. | 29 // A/B test for spdy when --use-spdy not set. |
36 void SpdyFieldTrial(); | 30 void SpdyFieldTrial(); |
37 | 31 |
38 // A/B test for warmest socket vs. most recently used socket. | |
39 void WarmConnectionFieldTrial(); | |
40 | |
41 // Field trial to see what disabling DNS pre-resolution does to | 32 // Field trial to see what disabling DNS pre-resolution does to |
42 // latency of page loads. | 33 // latency of page loads. |
43 void PredictorFieldTrial(); | 34 void PredictorFieldTrial(); |
44 | 35 |
45 // A field trial to see what effects launching Chrome automatically on | 36 // A field trial to see what effects launching Chrome automatically on |
46 // computer startup has on retention and usage of Chrome. | 37 // computer startup has on retention and usage of Chrome. |
47 void AutoLaunchChromeFieldTrial(); | 38 void AutoLaunchChromeFieldTrial(); |
48 | 39 |
49 // A collection of one-time-randomized and session-randomized field trials | 40 // A collection of one-time-randomized and session-randomized field trials |
50 // intended to test the uniformity and correctness of the field trial control, | 41 // intended to test the uniformity and correctness of the field trial control, |
(...skipping 20 matching lines...) Expand all Loading... |
71 // Instantiates dynamic trials by querying their state, to ensure they get | 62 // Instantiates dynamic trials by querying their state, to ensure they get |
72 // reported as used. | 63 // reported as used. |
73 void InstantiateDynamicTrials(); | 64 void InstantiateDynamicTrials(); |
74 | 65 |
75 const CommandLine& parsed_command_line_; | 66 const CommandLine& parsed_command_line_; |
76 | 67 |
77 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserFieldTrials); | 68 DISALLOW_COPY_AND_ASSIGN(ChromeBrowserFieldTrials); |
78 }; | 69 }; |
79 | 70 |
80 #endif // CHROME_BROWSER_CHROME_BROWSER_FIELD_TRIALS_H_ | 71 #endif // CHROME_BROWSER_CHROME_BROWSER_FIELD_TRIALS_H_ |
OLD | NEW |