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
3 // found in the LICENSE file.
5 #include "chrome/browser/prerender/prerender_final_status.h"
7 #include "chrome/browser/prerender/prerender_manager.h"
13 const char* kFinalStatusNames
[] = {
26 "Memory Limit Exceeded",
28 "Renderer Unresponsive",
30 "Rate Limit Exceeded",
34 "Source Render View Closed",
37 "Invalid HTTP Method",
44 "SSL Client Certificate Requested",
45 "Cache or History Cleared",
48 "Cross-Site Navigation Pending",
49 "DevTools Attached To The Tab",
50 "Session Storage Namespace Mismatch",
52 "Match Complete Dummy",
56 "Register Protocol Handler",
57 "Creating Audio Stream",
58 "Page Being Captured",
59 "Bad Deferred Redirect",
60 "Navigation Uncommitted",
61 "New Navigation Entry",
62 "Cookie Store Not Loaded",
64 "Non-Empty Browsing Instance",
65 "Navigation Intercepted",
68 static_assert(arraysize(kFinalStatusNames
) == FINAL_STATUS_MAX
+ 1,
69 "status name count mismatch");
73 const char* NameFromFinalStatus(FinalStatus final_status
) {
74 DCHECK_LT(static_cast<unsigned int>(final_status
),
75 arraysize(kFinalStatusNames
));
76 return kFinalStatusNames
[final_status
];
79 } // namespace prerender