1868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// Copyright (c) 2013 The Chromium Authors. All rights reserved. 2868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 3868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)// found in the LICENSE file. 4868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 5868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)#ifndef CHROME_BROWSER_CHROMEOS_NET_PROXY_CONFIG_HANDLER_H_ 6868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)#define CHROME_BROWSER_CHROMEOS_NET_PROXY_CONFIG_HANDLER_H_ 7868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 8868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)#include "base/memory/scoped_ptr.h" 94e180b6a0b4720a9b8e9e959a882386f690f08ffTorne (Richard Coles)#include "components/onc/onc_constants.h" 10868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 11ca12bfac764ba476d6cd062bf1dde12cc64c3f40Ben Murdochclass PrefRegistrySimple; 12ca12bfac764ba476d6cd062bf1dde12cc64c3f40Ben Murdochclass PrefService; 13868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)class ProxyConfigDictionary; 14868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 157dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdochnamespace user_prefs { 167dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdochclass PrefRegistrySyncable; 177dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdoch} 187dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdoch 19868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)namespace chromeos { 20868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 21f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)class NetworkState; 22868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 23868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)namespace proxy_config { 24868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 25ca12bfac764ba476d6cd062bf1dde12cc64c3f40Ben Murdoch// Get the proxy configuration including per-network policies for network 26ca12bfac764ba476d6cd062bf1dde12cc64c3f40Ben Murdoch// |network|. If |profile_prefs| is NULL, then only shared settings (and device 27ca12bfac764ba476d6cd062bf1dde12cc64c3f40Ben Murdoch// policy) are respected. This is e.g. the case for the signin screen and the 28ca12bfac764ba476d6cd062bf1dde12cc64c3f40Ben Murdoch// system request context. 29f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)scoped_ptr<ProxyConfigDictionary> GetProxyConfigForNetwork( 30ca12bfac764ba476d6cd062bf1dde12cc64c3f40Ben Murdoch const PrefService* profile_prefs, 31ca12bfac764ba476d6cd062bf1dde12cc64c3f40Ben Murdoch const PrefService* local_state_prefs, 32f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) const NetworkState& network, 33ca12bfac764ba476d6cd062bf1dde12cc64c3f40Ben Murdoch onc::ONCSource* onc_source); 34868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 35f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles)void SetProxyConfigForNetwork(const ProxyConfigDictionary& proxy_config, 36f8ee788a64d60abd8f2d742a5fdedde054ecd910Torne (Richard Coles) const NetworkState& network); 37868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 38ca12bfac764ba476d6cd062bf1dde12cc64c3f40Ben Murdochvoid RegisterPrefs(PrefRegistrySimple* registry); 39ca12bfac764ba476d6cd062bf1dde12cc64c3f40Ben Murdoch 407dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdochvoid RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); 417dbb3d5cf0c15f500944d211057644d6a2f37371Ben Murdoch 42868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)} // namespace proxy_config 43868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 44868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)} // namespace chromeos 45868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles) 46868fa2fe829687343ffae624259930155e16dbd8Torne (Richard Coles)#endif // CHROME_BROWSER_CHROMEOS_NET_PROXY_CONFIG_HANDLER_H_ 47