Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(866)

Side by Side Diff: chrome/browser/prerender/prerender_final_status.cc

Issue 815363002: replace COMPILE_ASSERT with static_assert in chrome/browser/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 #include "chrome/browser/prerender/prerender_final_status.h" 5 #include "chrome/browser/prerender/prerender_final_status.h"
6 6
7 #include "chrome/browser/prerender/prerender_manager.h" 7 #include "chrome/browser/prerender/prerender_manager.h"
8 8
9 namespace prerender { 9 namespace prerender {
10 10
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 "Page Being Captured", 58 "Page Being Captured",
59 "Bad Deferred Redirect", 59 "Bad Deferred Redirect",
60 "Navigation Uncommitted", 60 "Navigation Uncommitted",
61 "New Navigation Entry", 61 "New Navigation Entry",
62 "Cookie Store Not Loaded", 62 "Cookie Store Not Loaded",
63 "Cookie Conflict", 63 "Cookie Conflict",
64 "Non-Empty Browsing Instance", 64 "Non-Empty Browsing Instance",
65 "Navigation Intercepted", 65 "Navigation Intercepted",
66 "Max", 66 "Max",
67 }; 67 };
68 COMPILE_ASSERT(arraysize(kFinalStatusNames) == FINAL_STATUS_MAX + 1, 68 static_assert(arraysize(kFinalStatusNames) == FINAL_STATUS_MAX + 1,
69 PrerenderFinalStatus_name_count_mismatch); 69 "status name count mismatch");
70 70
71 } // namespace 71 } // namespace
72 72
73 const char* NameFromFinalStatus(FinalStatus final_status) { 73 const char* NameFromFinalStatus(FinalStatus final_status) {
74 DCHECK_LT(static_cast<unsigned int>(final_status), 74 DCHECK_LT(static_cast<unsigned int>(final_status),
75 arraysize(kFinalStatusNames)); 75 arraysize(kFinalStatusNames));
76 return kFinalStatusNames[final_status]; 76 return kFinalStatusNames[final_status];
77 } 77 }
78 78
79 } // namespace prerender 79 } // namespace prerender
OLDNEW
« no previous file with comments | « chrome/browser/prerender/prerender_field_trial.cc ('k') | chrome/browser/prerender/prerender_link_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698