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

Unified Diff: chrome/browser/chromeos/proxy_cros_settings_parser.h

Issue 8467012: Refactor proxy handling for ChromeOS to not go through the CrosSettings interface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed comments. Created 9 years, 1 month 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: chrome/browser/chromeos/proxy_cros_settings_parser.h
diff --git a/chrome/browser/chromeos/proxy_cros_settings_parser.h b/chrome/browser/chromeos/proxy_cros_settings_parser.h
new file mode 100644
index 0000000000000000000000000000000000000000..e47f93f87cb10e4c1a9c4bf3bfcc4b2ca8feb428
--- /dev/null
+++ b/chrome/browser/chromeos/proxy_cros_settings_parser.h
@@ -0,0 +1,57 @@
+// Copyright (c) 2011 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.
+
+#ifndef CHROME_BROWSER_CHROMEOS_PROXY_CROS_SETTINGS_PARSER_H_
+#define CHROME_BROWSER_CHROMEOS_PROXY_CROS_SETTINGS_PARSER_H_
+#pragma once
+
+#include <string>
+
+class Profile;
+
+namespace base {
+class Value;
+}
+
+namespace chromeos {
+
+extern const char kProxyPacUrl[];
+extern const char kProxySingleHttp[];
+extern const char kProxySingleHttpPort[];
+extern const char kProxyHttpUrl[];
+extern const char kProxyHttpPort[];
+extern const char kProxyHttpsUrl[];
+extern const char kProxyHttpsPort[];
+extern const char kProxyType[];
+extern const char kProxySingle[];
+extern const char kProxyFtpUrl[];
+extern const char kProxyFtpPort[];
+extern const char kProxySocks[];
+extern const char kProxySocksPort[];
+extern const char kProxyIgnoreList[];
+
+extern const char* const kProxySettings[];
+extern const size_t kProxySettingsCount;
+
+// This namespace defines two helper functions for parsing Proxy configuration
+// to and from the ProxyConfigServiceImpl and the UI that exposes them to the
+// user.
+namespace proxy_cros_settings_parser {
+ // Returns true if the supplied |path| is a proxy preference name.
+ bool IsProxyPref(const std::string& path);
+
+ // Sets a value in the current proxy configuration on the specified profile.
+ void SetProxyPrefValue(Profile* profile,
+ const std::string& path,
+ const base::Value* in_value);
+
+ // Gets a value from the current proxy configuration on the specified profile.
+ bool GetProxyPrefValue(Profile* profile,
+ const std::string& path,
+ base::Value** out_value);
+} // namespace proxy_cros_settings_parser
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_PROXY_CROS_SETTINGS_PARSER_H_

Powered by Google App Engine
This is Rietveld 408576698