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

Side by Side Diff: net/proxy/proxy_config_source.cc

Issue 826973002: replace COMPILE_ASSERT with static_assert in net/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: apply fixups Created 5 years, 11 months 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
« no previous file with comments | « net/http/http_server_properties.cc ('k') | net/quic/crypto/aes_128_gcm_12_decrypter_nss.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "net/proxy/proxy_config_source.h" 5 #include "net/proxy/proxy_config_source.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 9
10 namespace net { 10 namespace net {
11 11
12 namespace { 12 namespace {
13 13
14 const char* kSourceNames[] = { 14 const char* kSourceNames[] = {
15 "UNKNOWN", 15 "UNKNOWN",
16 "SYSTEM", 16 "SYSTEM",
17 "SYSTEM FAILED", 17 "SYSTEM FAILED",
18 "GCONF", 18 "GCONF",
19 "GSETTINGS", 19 "GSETTINGS",
20 "KDE", 20 "KDE",
21 "ENV", 21 "ENV",
22 "CUSTOM", 22 "CUSTOM",
23 "TEST" 23 "TEST"
24 }; 24 };
25 COMPILE_ASSERT(arraysize(kSourceNames) == NUM_PROXY_CONFIG_SOURCES, 25 static_assert(arraysize(kSourceNames) == NUM_PROXY_CONFIG_SOURCES,
26 source_names_incorrect_size); 26 "kSourceNames has incorrect size");
27 27
28 } // namespace 28 } // namespace
29 29
30 const char* ProxyConfigSourceToString(ProxyConfigSource source) { 30 const char* ProxyConfigSourceToString(ProxyConfigSource source) {
31 DCHECK_GT(NUM_PROXY_CONFIG_SOURCES, source); 31 DCHECK_GT(NUM_PROXY_CONFIG_SOURCES, source);
32 return kSourceNames[source]; 32 return kSourceNames[source];
33 } 33 }
34 34
35 } // namespace net 35 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_server_properties.cc ('k') | net/quic/crypto/aes_128_gcm_12_decrypter_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698