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

Unified Diff: net/proxy/proxy_config_source.cc

Issue 10310179: Track sources of proxy settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add bits to ProxyInfo for communicating proxy bypass. Created 8 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: net/proxy/proxy_config_source.cc
diff --git a/net/proxy/proxy_config_source.cc b/net/proxy/proxy_config_source.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f8ccace1e1dce05ca55cf8e8677d2f4beac08517
--- /dev/null
+++ b/net/proxy/proxy_config_source.cc
@@ -0,0 +1,36 @@
+// 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 "net/proxy/proxy_config_source.h"
+
+#include "base/basictypes.h"
+#include "base/logging.h"
+
+namespace net {
+
+namespace {
+
+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.
+ "UNKNOWN",
+ "NONE",
+ "SYSTEM",
+ "SYSTEM FAILED",
+ "GCONF",
+ "GSETTINGS",
+ "KDE",
+ "ENV",
+ "CUSTOM",
+ "TEST"
+};
+COMPILE_ASSERT(ARRAYSIZE_UNSAFE(kSourceNames) == NUM_PROXY_CONFIG_SOURCES,
+ source_names_incorrect_size);
+
+} // namespace
+
+const char* ProxyConfigSourceToString(ProxyConfigSource source) {
+ DCHECK_GT(NUM_PROXY_CONFIG_SOURCES, source);
+ return kSourceNames[source];
+}
+
+} // namespace net

Powered by Google App Engine
This is Rietveld 408576698