Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: components/proxy_config/pref_proxy_config_tracker_impl.h

Issue 2950573002: Fix chromeos::ProxyConfigServiceImpl not setting ProxyConfig on start. (Closed)
Patch Set: Oops Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 COMPONENTS_PROXY_CONFIG_PREF_PROXY_CONFIG_TRACKER_IMPL_H_ 5 #ifndef COMPONENTS_PROXY_CONFIG_PREF_PROXY_CONFIG_TRACKER_IMPL_H_
6 #define COMPONENTS_PROXY_CONFIG_PREF_PROXY_CONFIG_TRACKER_IMPL_H_ 6 #define COMPONENTS_PROXY_CONFIG_PREF_PROXY_CONFIG_TRACKER_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 ProxyPrefs::ConfigState GetProxyConfig(net::ProxyConfig* config); 142 ProxyPrefs::ConfigState GetProxyConfig(net::ProxyConfig* config);
143 143
144 // Called when there's a change in prefs proxy config. 144 // Called when there's a change in prefs proxy config.
145 // Subclasses can extend it for changes in other sources of proxy config. 145 // Subclasses can extend it for changes in other sources of proxy config.
146 virtual void OnProxyConfigChanged(ProxyPrefs::ConfigState config_state, 146 virtual void OnProxyConfigChanged(ProxyPrefs::ConfigState config_state,
147 const net::ProxyConfig& config); 147 const net::ProxyConfig& config);
148 148
149 void OnProxyPrefChanged(); 149 void OnProxyPrefChanged();
150 150
151 const PrefService* prefs() const { return pref_service_; } 151 const PrefService* prefs() const { return pref_service_; }
152 bool update_pending() const { return update_pending_; }
153 152
154 private: 153 private:
155 // Tracks configuration state. |pref_config_| is valid only if |config_state_| 154 // Tracks configuration state. |pref_config_| is valid only if |config_state_|
156 // is not CONFIG_UNSET. 155 // is not CONFIG_UNSET.
157 ProxyPrefs::ConfigState config_state_; 156 ProxyPrefs::ConfigState config_state_;
158 157
159 // Configuration as defined by prefs. 158 // Configuration as defined by prefs.
160 net::ProxyConfig pref_config_; 159 net::ProxyConfig pref_config_;
161 160
162 PrefService* pref_service_; 161 PrefService* pref_service_;
163 ProxyConfigServiceImpl* proxy_config_service_impl_; // Weak ptr. 162 ProxyConfigServiceImpl* proxy_config_service_impl_; // Weak ptr.
164 bool update_pending_; // True if config has not been pushed to network stack.
165 PrefChangeRegistrar proxy_prefs_; 163 PrefChangeRegistrar proxy_prefs_;
166 164
167 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_; 165 scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
168 166
169 base::ThreadChecker thread_checker_; 167 base::ThreadChecker thread_checker_;
170 168
171 DISALLOW_COPY_AND_ASSIGN(PrefProxyConfigTrackerImpl); 169 DISALLOW_COPY_AND_ASSIGN(PrefProxyConfigTrackerImpl);
172 }; 170 };
173 171
174 #endif // COMPONENTS_PROXY_CONFIG_PREF_PROXY_CONFIG_TRACKER_IMPL_H_ 172 #endif // COMPONENTS_PROXY_CONFIG_PREF_PROXY_CONFIG_TRACKER_IMPL_H_
OLDNEW
« no previous file with comments | « chromeos/network/proxy/proxy_config_service_impl.cc ('k') | components/proxy_config/pref_proxy_config_tracker_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698