1 // Copyright (c) 2006-2009 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 NET_PROXY_PROXY_CONFIG_SERVICE_FIXED_H_ 6 #define NET_PROXY_PROXY_CONFIG_SERVICE_FIXED_H_ 7 8 #include "net/base/net_errors.h" 9 #include "net/proxy/proxy_config_service.h" 10 11 namespace net { 12 13 // Implementation of ProxyConfigService that returns a fixed result. 14 class ProxyConfigServiceFixed : public ProxyConfigService { 15 public: ProxyConfigServiceFixed(const ProxyConfig & pc)16 explicit ProxyConfigServiceFixed(const ProxyConfig& pc) : pc_(pc) {} 17 18 // ProxyConfigService methods: GetProxyConfig(ProxyConfig * config)19 virtual int GetProxyConfig(ProxyConfig* config) { 20 *config = pc_; 21 return OK; 22 } 23 24 private: 25 ProxyConfig pc_; 26 }; 27 28 } // namespace net 29 30 #endif // NET_PROXY_PROXY_CONFIG_SERVICE_FIXED_H_ 31