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 10namespace base { 11class Value; 12} 13 14namespace chromeos { 15 16class UIProxyConfigService; 17 18extern const char kProxyPacUrl[]; 19extern const char kProxySingleHttp[]; 20extern const char kProxySingleHttpPort[]; 21extern const char kProxyHttpUrl[]; 22extern const char kProxyHttpPort[]; 23extern const char kProxyHttpsUrl[]; 24extern const char kProxyHttpsPort[]; 25extern const char kProxyType[]; 26extern const char kProxySingle[]; 27extern const char kProxyFtpUrl[]; 28extern const char kProxyFtpPort[]; 29extern const char kProxySocks[]; 30extern const char kProxySocksPort[]; 31extern const char kProxyIgnoreList[]; 32extern const char kProxyUsePacUrl[]; 33 34extern const char* const kProxySettings[]; 35extern const size_t kProxySettingsCount; 36 37// This namespace defines helper functions for setting/getting Proxy settings. 38namespace proxy_cros_settings_parser { 39 40// Returns true if the supplied |path| is a proxy preference name. 41bool IsProxyPref(const std::string& path); 42 43// Sets a value in the current proxy configuration on the specified profile. 44void 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. 49bool 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