1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_CHROMEOS_PROXY_CROS_SETTINGS_PARSER_H_ 6 #define CHROME_BROWSER_CHROMEOS_PROXY_CROS_SETTINGS_PARSER_H_ 7 8 #include <string> 9 10 namespace base { 11 class Value; 12 } 13 14 namespace chromeos { 15 16 class UIProxyConfigService; 17 18 extern const char kProxyPacUrl[]; 19 extern const char kProxySingleHttp[]; 20 extern const char kProxySingleHttpPort[]; 21 extern const char kProxyHttpUrl[]; 22 extern const char kProxyHttpPort[]; 23 extern const char kProxyHttpsUrl[]; 24 extern const char kProxyHttpsPort[]; 25 extern const char kProxyType[]; 26 extern const char kProxySingle[]; 27 extern const char kProxyFtpUrl[]; 28 extern const char kProxyFtpPort[]; 29 extern const char kProxySocks[]; 30 extern const char kProxySocksPort[]; 31 extern const char kProxyIgnoreList[]; 32 extern const char kProxyUsePacUrl[]; 33 34 extern const char* const kProxySettings[]; 35 extern const size_t kProxySettingsCount; 36 37 // This namespace defines helper functions for setting/getting Proxy settings. 38 namespace proxy_cros_settings_parser { 39 40 // Returns true if the supplied |path| is a proxy preference name. 41 bool IsProxyPref(const std::string& path); 42 43 // Sets a value in the current proxy configuration on the specified profile. 44 void SetProxyPrefValue(const std::string& path, 45 const base::Value* in_value, 46 UIProxyConfigService* config_service); 47 48 // Gets a value from the current proxy configuration on the specified profile. 49 bool GetProxyPrefValue(const UIProxyConfigService& config_service, 50 const std::string& path, 51 base::Value** out_value); 52 53 } // namespace proxy_cros_settings_parser 54 55 } // namespace chromeos 56 57 #endif // CHROME_BROWSER_CHROMEOS_PROXY_CROS_SETTINGS_PARSER_H_ 58