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

Unified Diff: chrome/browser/prefs/proxy_prefs.cc

Issue 14846004: Migrate ProxyConfigServiceImpl to NetworkStateHandler and NetworkProfileHandler. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 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
« no previous file with comments | « chrome/browser/prefs/proxy_prefs.h ('k') | chrome/browser/profiles/profile_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/proxy_prefs.cc
diff --git a/chrome/browser/prefs/proxy_prefs.cc b/chrome/browser/prefs/proxy_prefs.cc
index ab4c97448cb0d78a512a6b701aa9978df0998f8c..3a06a2baf506a99e765f237b64e90d42a6bace99 100644
--- a/chrome/browser/prefs/proxy_prefs.cc
+++ b/chrome/browser/prefs/proxy_prefs.cc
@@ -7,23 +7,23 @@
#include "base/basictypes.h"
#include "base/logging.h"
+namespace ProxyPrefs {
+
namespace {
// These names are exposed to the proxy extension API. They must be in sync
// with the constants of ProxyPrefs.
-const char* kProxyModeNames[] = { ProxyPrefs::kDirectProxyModeName,
- ProxyPrefs::kAutoDetectProxyModeName,
- ProxyPrefs::kPacScriptProxyModeName,
- ProxyPrefs::kFixedServersProxyModeName,
- ProxyPrefs::kSystemProxyModeName };
+const char* kProxyModeNames[] = { kDirectProxyModeName,
+ kAutoDetectProxyModeName,
+ kPacScriptProxyModeName,
+ kFixedServersProxyModeName,
+ kSystemProxyModeName };
-COMPILE_ASSERT(arraysize(kProxyModeNames) == ProxyPrefs::kModeCount,
+COMPILE_ASSERT(arraysize(kProxyModeNames) == kModeCount,
kProxyModeNames_must_have_size_of_NUM_MODES);
} // namespace
-namespace ProxyPrefs {
-
const char kDirectProxyModeName[] = "direct";
const char kAutoDetectProxyModeName[] = "auto_detect";
const char kPacScriptProxyModeName[] = "pac_script";
@@ -51,4 +51,23 @@ const char* ProxyModeToString(ProxyMode mode) {
return kProxyModeNames[mode];
}
+std::string ConfigStateToDebugString(ConfigState state) {
+ switch (state) {
+ case CONFIG_POLICY:
+ return "config_policy";
+ case CONFIG_EXTENSION:
+ return "config_extension";
+ case CONFIG_OTHER_PRECEDE:
+ return "config_other_precede";
+ case CONFIG_SYSTEM:
+ return "config_system";
+ case CONFIG_FALLBACK:
+ return "config_fallback";
+ case CONFIG_UNSET:
+ return "config_unset";
+ }
+ NOTREACHED();
+ return "";
+}
+
} // namespace ProxyPrefs
« no previous file with comments | « chrome/browser/prefs/proxy_prefs.h ('k') | chrome/browser/profiles/profile_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698