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_PRERENDER_PRERENDER_FIELD_TRIAL_H_ | 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_FIELD_TRIAL_H_ |
6 #define CHROME_BROWSER_PRERENDER_PRERENDER_FIELD_TRIAL_H_ | 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_FIELD_TRIAL_H_ |
7 | 7 |
| 8 #include "base/feature_list.h" |
| 9 |
8 class Profile; | 10 class Profile; |
9 | 11 |
10 namespace base { | |
11 class CommandLine; | |
12 } | |
13 | |
14 namespace prerender { | 12 namespace prerender { |
15 | 13 |
16 // Parse the --prerender= command line switch, which controls prerendering. If | 14 // Exposed for testing. |
17 // the switch is unset or is set to "auto" then the user is assigned to a | 15 extern const base::Feature kNoStatePrefetchFeature; |
18 // field trial. | 16 extern const char kNoStatePrefetchFeatureModeParameterName[]; |
19 void ConfigurePrerender(const base::CommandLine& command_line); | 17 extern const char kNoStatePrefetchFeatureModeParameterSimpleLoad[]; |
| 18 |
| 19 // Configures prerender using kNoStatePrefetchFeature and field trial |
| 20 // parameters. |
| 21 void ConfigurePrerender(); |
20 | 22 |
21 // Returns true if the user has opted in or has been opted in to the | 23 // Returns true if the user has opted in or has been opted in to the |
22 // prerendering from Omnibox experiment. | 24 // prerendering from Omnibox experiment. |
23 bool IsOmniboxEnabled(Profile* profile); | 25 bool IsOmniboxEnabled(Profile* profile); |
24 | 26 |
25 } // namespace prerender | 27 } // namespace prerender |
26 | 28 |
27 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_FIELD_TRIAL_H_ | 29 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_FIELD_TRIAL_H_ |
OLD | NEW |