| 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
|
|
|