blob: eae02a67703f6be31c10e741767d5ab84d328fff [file] [log] [blame]
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/prerender/prerender_final_status.h"
#include "chrome/browser/prerender/prerender_manager.h"
namespace prerender {
namespace {
const char* kFinalStatusNames[] = {
"Timed Out",
"Manager Shutdown",
"Create New Window",
"Profile Destroyed",
"App Terminating",
"Javascript Alert",
"Auth Needed",
"Memory Limit Exceeded",
"JS Out Of Memory",
"Renderer Unresponsive",
"Too many processes",
"Rate Limit Exceeded",
"Pending Skipped",
"Control Group",
"HTML5 Media",
"Source Render View Closed",
"Renderer Crashed",
"Unsupported Scheme",
"Invalid HTTP Method",
"Recently Visited",
"Page ID Conflict",
"Safe Browsing",
"Fragment Mismatch",
"SSL Client Certificate Requested",
"Cache or History Cleared",
"SSL Error",
"Cross-Site Navigation Pending",
"DevTools Attached To The Tab",
"Session Storage Namespace Mismatch",
"No Use Group",
"Match Complete Dummy",
"Register Protocol Handler",
"Creating Audio Stream",
"Page Being Captured",
"Bad Deferred Redirect",
"Navigation Uncommitted",
"New Navigation Entry",
"Cookie Store Not Loaded",
"Cookie Conflict",
"Non-Empty Browsing Instance",
"Navigation Intercepted",
COMPILE_ASSERT(arraysize(kFinalStatusNames) == FINAL_STATUS_MAX + 1,
} // namespace
const char* NameFromFinalStatus(FinalStatus final_status) {
DCHECK_LT(static_cast<unsigned int>(final_status),
return kFinalStatusNames[final_status];
} // namespace prerender