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 <string> | 8 #include <string> |
9 | 9 |
10 class CommandLine; | 10 class CommandLine; |
11 class Profile; | 11 class Profile; |
12 | 12 |
13 namespace prerender { | 13 namespace prerender { |
14 | 14 |
15 // Parse the --prerender= command line switch, which controls both prerendering | 15 // Parse the --prerender= command line switch, which controls both prerendering |
16 // and prefetching. If the switch is unset, or is set to "auto", then the user | 16 // and prefetching. If the switch is unset, or is set to "auto", then the user |
17 // is assigned to a field trial. | 17 // is assigned to a field trial. |
18 void ConfigurePrefetchAndPrerender(const CommandLine& command_line); | 18 void ConfigurePrefetchAndPrerender(const CommandLine& command_line); |
19 | 19 |
20 // Returns true if the user has opted in or has been opted in to the | 20 // Returns true if the user has opted in or has been opted in to the |
21 // prerendering from Omnibox experiment. | 21 // prerendering from Omnibox experiment. |
22 bool IsOmniboxEnabled(Profile* profile); | 22 bool IsOmniboxEnabled(Profile* profile); |
23 | 23 |
24 // Returns true iff the user has opted in or has been opted into the speculative | 24 // Returns true iff the user has opted in or has been opted into the speculative |
25 // resource prefetching learning experiment. | 25 // resource prefetching learning experiment. |
26 bool IsSpeculativeResourcePrefetchingLearningEnabled(Profile* profile); | 26 bool IsSpeculativeResourcePrefetchingLearningEnabled(Profile* profile); |
27 | 27 |
| 28 // Returns true iff the user has opted in or has been opted into the speculative |
| 29 // resource prefetching experiment. |
| 30 bool IsSpeculativeResourcePrefetchingEnabled(Profile* profile); |
| 31 |
28 } // namespace prerender | 32 } // namespace prerender |
29 | 33 |
30 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_FIELD_TRIAL_H_ | 34 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_FIELD_TRIAL_H_ |
OLD | NEW |