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_ORIGIN_H_ | 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_ORIGIN_H_ |
6 #define CHROME_BROWSER_PRERENDER_PRERENDER_ORIGIN_H_ | 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_ORIGIN_H_ |
7 | 7 |
8 namespace prerender { | 8 namespace prerender { |
9 | 9 |
10 // Origin indicates what caused the prerender. | 10 // Origin indicates what caused the prerender. |
11 // NOTE: New values need to be appended, since they are used in histograms. | 11 // NOTE: New values need to be appended, since they are used in histograms. |
12 enum Origin { | 12 enum Origin { |
13 ORIGIN_LINK_REL_PRERENDER = 0, | 13 ORIGIN_LINK_REL_PRERENDER = 0, |
14 // Obsolete: ORIGIN_OMNIBOX_ORIGINAL = 1, | 14 // Obsolete: ORIGIN_OMNIBOX_ORIGINAL = 1, |
15 ORIGIN_GWS_PRERENDER = 2, | 15 ORIGIN_GWS_PRERENDER = 2, |
16 // Obsolete: ORIGIN_OMNIBOX_CONSERVATIVE = 3, | 16 // Obsolete: ORIGIN_OMNIBOX_CONSERVATIVE = 3, |
17 // Obsolete: ORIGIN_OMNIBOX_EXACT = 4, | 17 // Obsolete: ORIGIN_OMNIBOX_EXACT = 4, |
18 ORIGIN_OMNIBOX = 5, | 18 ORIGIN_OMNIBOX = 5, |
19 ORIGIN_MAX | 19 ORIGIN_LOCAL_PREDICTOR = 6, |
mmenke
2012/10/08 18:20:07
This origin is currently not used in the same hist
gavinp
2012/10/10 18:14:56
Very good catch. This kind of subtlety is what's m
| |
20 ORIGIN_NONE = 7, | |
21 ORIGIN_MAX, | |
20 }; | 22 }; |
21 | 23 |
22 // Return a human-readable name for |origin|. | 24 // Return a human-readable name for |origin|. |
23 const char* NameFromOrigin(Origin origin); | 25 const char* NameFromOrigin(Origin origin); |
24 | 26 |
25 } // namespace prerender | 27 } // namespace prerender |
26 | 28 |
27 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_ORIGIN_H_ | 29 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_ORIGIN_H_ |
OLD | NEW |