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

Side by Side Diff: chrome/browser/extensions/api/proxy/proxy_api_constants.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 // Constants for the Chrome Extensions Proxy Settings API. 5 // Constants for the Chrome Extensions Proxy Settings API.
6 6
7 #include "chrome/browser/extensions/api/proxy/proxy_api_constants.h" 7 #include "chrome/browser/extensions/api/proxy/proxy_api_constants.h"
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 10
(...skipping 24 matching lines...) Expand all
35 "proxyForHttps", 35 "proxyForHttps",
36 "proxyForFtp", 36 "proxyForFtp",
37 "fallbackProxy" }; 37 "fallbackProxy" };
38 38
39 const char* const scheme_name[] = { "*error*", 39 const char* const scheme_name[] = { "*error*",
40 "http", 40 "http",
41 "https", 41 "https",
42 "ftp", 42 "ftp",
43 "socks" }; 43 "socks" };
44 44
45 COMPILE_ASSERT(SCHEME_MAX == SCHEME_FALLBACK, 45 static_assert(SCHEME_MAX == SCHEME_FALLBACK,
46 SCHEME_MAX_must_equal_SCHEME_FALLBACK); 46 "SCHEME_MAX is incorrect");
47 COMPILE_ASSERT(arraysize(field_name) == SCHEME_MAX + 1, 47 static_assert(arraysize(field_name) == SCHEME_MAX + 1,
48 field_name_array_is_wrong_size); 48 "field_name array size is incorrect");
49 COMPILE_ASSERT(arraysize(scheme_name) == SCHEME_MAX + 1, 49 static_assert(arraysize(scheme_name) == SCHEME_MAX + 1,
50 scheme_name_array_is_wrong_size); 50 "scheme_name array size is incorrect");
51 COMPILE_ASSERT(SCHEME_ALL == 0, singleProxy_must_be_first_option); 51 static_assert(SCHEME_ALL == 0, "SCHEME_ALL must be the first value");
52 52
53 } // namespace proxy_api_constants 53 } // namespace proxy_api_constants
54 } // namespace extensions 54 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698