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

Side by Side Diff: chrome/browser/prerender/prerender_field_trial.h

Issue 8600004: Adding a fourth omnibox prerender experiment. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix clang Created 9 years, 1 month 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) 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_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 enum OmniboxHeuristic { 15 enum OmniboxHeuristic {
16 OMNIBOX_HEURISTIC_ORIGINAL, 16 OMNIBOX_HEURISTIC_ORIGINAL,
17 OMNIBOX_HEURISTIC_CONSERVATIVE, 17 OMNIBOX_HEURISTIC_CONSERVATIVE,
18 OMNIBOX_HEURISTIC_EXACT, 18 OMNIBOX_HEURISTIC_EXACT,
19 OMNIBOX_HEURISTIC_EXACT_FULL,
19 OMNIBOX_HEURISTIC_MAX 20 OMNIBOX_HEURISTIC_MAX
20 }; 21 };
21 22
22 // Parse the --prerender= command line switch, which controls both prerendering 23 // Parse the --prerender= command line switch, which controls both prerendering
23 // and prefetching. If the switch is unset, or is set to "auto", then the user 24 // and prefetching. If the switch is unset, or is set to "auto", then the user
24 // is assigned to a field trial. 25 // is assigned to a field trial.
25 void ConfigurePrefetchAndPrerender(const CommandLine& command_line); 26 void ConfigurePrefetchAndPrerender(const CommandLine& command_line);
26 27
27 // Returns true if the user has opted in or has been opted in to the 28 // Returns true if the user has opted in or has been opted in to the
28 // prerendering from Omnibox experiment. 29 // prerendering from Omnibox experiment.
29 bool IsOmniboxEnabled(Profile* profile); 30 bool IsOmniboxEnabled(Profile* profile);
30 31
31 // Returns the heuristic to use when determining if prerendering should be 32 // Returns the heuristic to use when determining if prerendering should be
32 // attempted from the Omnibox. Governed by a field trial. 33 // attempted from the Omnibox. Governed by a field trial.
33 OmniboxHeuristic GetOmniboxHeuristicToUse(); 34 OmniboxHeuristic GetOmniboxHeuristicToUse();
34 35
35 // Returns the suffix to use for histograms dependent on which Omnibox heuristic 36 // Returns the suffix to use for histograms dependent on which Omnibox heuristic
36 // is active. 37 // is active.
37 std::string GetOmniboxHistogramSuffix(); 38 std::string GetOmniboxHistogramSuffix();
38 39
39 } // namespace prerender 40 } // namespace prerender
40 41
41 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_FIELD_TRIAL_H_ 42 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_FIELD_TRIAL_H_
OLDNEW
« no previous file with comments | « chrome/browser/autocomplete/network_action_predictor.cc ('k') | chrome/browser/prerender/prerender_field_trial.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698