OLD | NEW |
---|---|
(Empty) | |
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. | |
4 | |
5 #include "net/proxy/proxy_config_source.h" | |
6 | |
7 #include "base/basictypes.h" | |
8 #include "base/logging.h" | |
9 | |
10 namespace net { | |
11 | |
12 namespace { | |
13 | |
14 static const char* kSourceNames[] = { | |
eroman
2012/06/11 23:18:34
optional nit: Don't need the static if in anonymou
asanka
2012/06/12 19:37:18
Done.
| |
15 "UNKNOWN", | |
16 "NONE", | |
17 "SYSTEM", | |
18 "SYSTEM FAILED", | |
19 "GCONF", | |
20 "GSETTINGS", | |
21 "KDE", | |
22 "ENV", | |
23 "CUSTOM", | |
24 "TEST" | |
25 }; | |
26 COMPILE_ASSERT(ARRAYSIZE_UNSAFE(kSourceNames) == NUM_PROXY_CONFIG_SOURCES, | |
27 source_names_incorrect_size); | |
28 | |
29 } // namespace | |
30 | |
31 const char* ProxyConfigSourceToString(ProxyConfigSource source) { | |
32 DCHECK_GT(NUM_PROXY_CONFIG_SOURCES, source); | |
33 return kSourceNames[source]; | |
34 } | |
35 | |
36 } // namespace net | |
OLD | NEW |