1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_PRERENDER_PRERENDER_EVENTS_H_ 6 #define CHROME_BROWSER_PRERENDER_PRERENDER_EVENTS_H_ 7 8 namespace prerender { 9 10 // Events registered during prerendering used for debugging purposes and to 11 // gather metrics. 12 enum PrerenderEvent { 13 PRERENDER_EVENT_SWAPIN_NO_DELEGATE = 0, 14 PRERENDER_EVENT_SWAPIN_CANDIDATE = 1, 15 PRERENDER_EVENT_SWAPIN_CANDIDATE_NAMESPACE_MATCHES = 2, 16 PRERENDER_EVENT_SWAPIN_NO_MERGE_PENDING = 3, 17 PRERENDER_EVENT_SWAPIN_MERGING_DISABLED = 4, 18 PRERENDER_EVENT_SWAPIN_ISSUING_MERGE = 5, 19 PRERENDER_EVENT_MERGE_FOR_SWAPIN_CANDIDATE = 6, 20 PRERENDER_EVENT_MERGE_RESULT_NO_PENDING_SWAPIN = 7, 21 // Obsolete: PRERENDER_EVENT_MERGE_RESULT_TIMEOUT_CB = 8, 22 // Obsolete: PRERENDER_EVENT_MERGE_RESULT_RESULT_CB = 9, 23 PRERENDER_EVENT_MERGE_RESULT_TIMED_OUT = 10, 24 PRERENDER_EVENT_MERGE_RESULT_MERGE_DONE = 11, 25 PRERENDER_EVENT_MERGE_RESULT_RESULT_NAMESPACE_NOT_FOUND = 12, 26 PRERENDER_EVENT_MERGE_RESULT_RESULT_NAMESPACE_NOT_ALIAS = 13, 27 PRERENDER_EVENT_MERGE_RESULT_RESULT_NOT_LOGGING = 14, 28 PRERENDER_EVENT_MERGE_RESULT_RESULT_NO_TRANSACTIONS = 15, 29 PRERENDER_EVENT_MERGE_RESULT_RESULT_TOO_MANY_TRANSACTIONS = 16, 30 PRERENDER_EVENT_MERGE_RESULT_RESULT_NOT_MERGEABLE = 17, 31 PRERENDER_EVENT_MERGE_RESULT_RESULT_MERGEABLE = 18, 32 PRERENDER_EVENT_MERGE_RESULT_MERGE_FAILED = 19, 33 PRERENDER_EVENT_MERGE_RESULT_SWAPPING_IN = 20, 34 // Obsolete: PRERENDER_EVENT_MERGE_RESULT_SWAPIN_SUCCESSFUL = 21, 35 PRERENDER_EVENT_MERGE_RESULT_SWAPIN_FAILED = 22, 36 PRERENDER_EVENT_MAX, 37 }; 38 39 // Return a human-readable name for |event|. 40 const char* NameFromPrerenderEvent(PrerenderEvent event); 41 42 } // namespace prerender 43 44 #endif // CHROME_BROWSER_PRERENDER_PRERENDER_EVENTS_H_ 45