| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_PROXY_CONFIG_SERVICE_IMPL_H_ | 5 #ifndef CHROMEOS_NETWORK_PROXY_PROXY_CONFIG_SERVICE_IMPL_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_PROXY_CONFIG_SERVICE_IMPL_H_ | 6 #define CHROMEOS_NETWORK_PROXY_PROXY_CONFIG_SERVICE_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "chromeos/network/network_state_handler_observer.h" | 12 #include "chromeos/network/network_state_handler_observer.h" |
| 13 #include "components/onc/onc_constants.h" | 13 #include "components/onc/onc_constants.h" |
| 14 #include "components/prefs/pref_change_registrar.h" | 14 #include "components/prefs/pref_change_registrar.h" |
| 15 #include "components/proxy_config/pref_proxy_config_tracker_impl.h" | 15 #include "components/proxy_config/pref_proxy_config_tracker_impl.h" |
| 16 | 16 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 35 // profile or via IOThread constructor for local state and is owned by the | 35 // profile or via IOThread constructor for local state and is owned by the |
| 36 // respective classes. | 36 // respective classes. |
| 37 // | 37 // |
| 38 // The user's proxy config, proxy policies and proxy from prefs, are used to | 38 // The user's proxy config, proxy policies and proxy from prefs, are used to |
| 39 // determine the effective proxy config, which is then pushed through | 39 // determine the effective proxy config, which is then pushed through |
| 40 // PrefProxyConfigTrackerImpl to ChromeProxyConfigService to the | 40 // PrefProxyConfigTrackerImpl to ChromeProxyConfigService to the |
| 41 // network stack. | 41 // network stack. |
| 42 // | 42 // |
| 43 // |profile_prefs| can be NULL if this object should only track prefs from | 43 // |profile_prefs| can be NULL if this object should only track prefs from |
| 44 // local state (e.g., for system request context or sigin-in screen). | 44 // local state (e.g., for system request context or sigin-in screen). |
| 45 explicit ProxyConfigServiceImpl(PrefService* profile_prefs, | 45 ProxyConfigServiceImpl( |
| 46 PrefService* local_state_prefs); | 46 PrefService* profile_prefs, |
| 47 PrefService* local_state_prefs, |
| 48 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner); |
| 47 ~ProxyConfigServiceImpl() override; | 49 ~ProxyConfigServiceImpl() override; |
| 48 | 50 |
| 49 // PrefProxyConfigTrackerImpl implementation. | 51 // PrefProxyConfigTrackerImpl implementation. |
| 50 void OnProxyConfigChanged(ProxyPrefs::ConfigState config_state, | 52 void OnProxyConfigChanged(ProxyPrefs::ConfigState config_state, |
| 51 const net::ProxyConfig& config) override; | 53 const net::ProxyConfig& config) override; |
| 52 | 54 |
| 53 // NetworkStateHandlerObserver implementation. | 55 // NetworkStateHandlerObserver implementation. |
| 54 void DefaultNetworkChanged(const NetworkState* network) override; | 56 void DefaultNetworkChanged(const NetworkState* network) override; |
| 55 void OnShuttingDown() override; | 57 void OnShuttingDown() override; |
| 56 | 58 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 // Not owned. | 102 // Not owned. |
| 101 PrefService* local_state_prefs_; | 103 PrefService* local_state_prefs_; |
| 102 | 104 |
| 103 base::WeakPtrFactory<ProxyConfigServiceImpl> pointer_factory_; | 105 base::WeakPtrFactory<ProxyConfigServiceImpl> pointer_factory_; |
| 104 | 106 |
| 105 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceImpl); | 107 DISALLOW_COPY_AND_ASSIGN(ProxyConfigServiceImpl); |
| 106 }; | 108 }; |
| 107 | 109 |
| 108 } // namespace chromeos | 110 } // namespace chromeos |
| 109 | 111 |
| 110 #endif // CHROME_BROWSER_CHROMEOS_PROXY_CONFIG_SERVICE_IMPL_H_ | 112 #endif // CHROMEOS_NETWORK_PROXY_PROXY_CONFIG_SERVICE_IMPL_H_ |
| OLD | NEW |