OLD | NEW |
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_FINAL_STATUS_H_ | 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_FINAL_STATUS_H_ |
6 #define CHROME_BROWSER_PRERENDER_PRERENDER_FINAL_STATUS_H_ | 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_FINAL_STATUS_H_ |
7 | 7 |
| 8 #include "chrome/browser/prerender/prerender_origin.h" |
| 9 |
8 namespace prerender { | 10 namespace prerender { |
9 | 11 |
10 // FinalStatus indicates whether |this| was used, or why it was cancelled. | 12 // FinalStatus indicates whether |this| was used, or why it was cancelled. |
11 // NOTE: New values need to be appended, since they are used in histograms. | 13 // NOTE: New values need to be appended, since they are used in histograms. |
12 enum FinalStatus { | 14 enum FinalStatus { |
13 FINAL_STATUS_USED = 0, | 15 FINAL_STATUS_USED = 0, |
14 FINAL_STATUS_TIMED_OUT = 1, | 16 FINAL_STATUS_TIMED_OUT = 1, |
15 FINAL_STATUS_EVICTED = 2, | 17 FINAL_STATUS_EVICTED = 2, |
16 FINAL_STATUS_MANAGER_SHUTDOWN = 3, | 18 FINAL_STATUS_MANAGER_SHUTDOWN = 3, |
17 // Obsolete: FINAL_STATUS_CLOSED = 4 | 19 // Obsolete: FINAL_STATUS_CLOSED = 4 |
(...skipping 20 matching lines...) Expand all Loading... |
38 FINAL_STATUS_RECENTLY_VISITED = 25, | 40 FINAL_STATUS_RECENTLY_VISITED = 25, |
39 FINAL_STATUS_WINDOW_OPENER = 26, | 41 FINAL_STATUS_WINDOW_OPENER = 26, |
40 FINAL_STATUS_PAGE_ID_CONFLICT = 27, | 42 FINAL_STATUS_PAGE_ID_CONFLICT = 27, |
41 FINAL_STATUS_SAFE_BROWSING = 28, | 43 FINAL_STATUS_SAFE_BROWSING = 28, |
42 FINAL_STATUS_FRAGMENT_MISMATCH = 29, | 44 FINAL_STATUS_FRAGMENT_MISMATCH = 29, |
43 FINAL_STATUS_SSL_CLIENT_CERTIFICATE_REQUESTED = 30, | 45 FINAL_STATUS_SSL_CLIENT_CERTIFICATE_REQUESTED = 30, |
44 FINAL_STATUS_CACHE_OR_HISTORY_CLEARED = 31, | 46 FINAL_STATUS_CACHE_OR_HISTORY_CLEARED = 31, |
45 FINAL_STATUS_MAX, | 47 FINAL_STATUS_MAX, |
46 }; | 48 }; |
47 | 49 |
48 void RecordFinalStatus(FinalStatus final_status); | 50 void RecordFinalStatus(Origin origin, FinalStatus final_status); |
49 | 51 |
50 // Return a human-readable name for |final_status|. |final_status| | 52 // Return a human-readable name for |final_status|. |final_status| |
51 // is expected to be a valid value. | 53 // is expected to be a valid value. |
52 const char* NameFromFinalStatus(FinalStatus final_status); | 54 const char* NameFromFinalStatus(FinalStatus final_status); |
53 | 55 |
54 } // namespace prerender | 56 } // namespace prerender |
55 | 57 |
56 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_FINAL_STATUS_H_ | 58 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_FINAL_STATUS_H_ |
OLD | NEW |