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

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

Issue 1221033002: Add proxy_config component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update copyrights Created 5 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/prefs/proxy_prefs_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
deleted file mode 100644
index 04785ec2de6be4132e231251f2ca9c9fcfccb88f..0000000000000000000000000000000000000000
--- a/chrome/browser/prefs/proxy_prefs.cc
+++ /dev/null
@@ -1,73 +0,0 @@
-// Copyright (c) 2010 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 "chrome/browser/prefs/proxy_prefs.h"
-
-#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[] = { kDirectProxyModeName,
- kAutoDetectProxyModeName,
- kPacScriptProxyModeName,
- kFixedServersProxyModeName,
- kSystemProxyModeName };
-
-static_assert(arraysize(kProxyModeNames) == kModeCount,
- "kProxyModeNames must have kModeCount elements");
-
-} // namespace
-
-const char kDirectProxyModeName[] = "direct";
-const char kAutoDetectProxyModeName[] = "auto_detect";
-const char kPacScriptProxyModeName[] = "pac_script";
-const char kFixedServersProxyModeName[] = "fixed_servers";
-const char kSystemProxyModeName[] = "system";
-
-bool IntToProxyMode(int in_value, ProxyMode* out_value) {
- DCHECK(out_value);
- if (in_value < 0 || in_value >= kModeCount)
- return false;
- *out_value = static_cast<ProxyMode>(in_value);
- return true;
-}
-
-bool StringToProxyMode(const std::string& in_value, ProxyMode* out_value) {
- DCHECK(out_value);
- for (int i = 0; i < kModeCount; i++) {
- if (in_value == kProxyModeNames[i])
- return IntToProxyMode(i, out_value);
- }
- return false;
-}
-
-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/prefs/proxy_prefs_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698