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

Side by Side Diff: chrome/browser/chromeos/ui_proxy_config_service.h

Issue 18112018: Cleanup the UseSharedProxies preference. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added a missing member initializer. Created 7 years, 5 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_UI_PROXY_CONFIG_SERVICE_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_UI_PROXY_CONFIG_SERVICE_H_
6 #define CHROME_BROWSER_CHROMEOS_UI_PROXY_CONFIG_SERVICE_H_ 6 #define CHROME_BROWSER_CHROMEOS_UI_PROXY_CONFIG_SERVICE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 10 matching lines...) Expand all
21 // GetProxyConfig and SetProxyConfig. 21 // GetProxyConfig and SetProxyConfig.
22 // 22 //
23 // Before reading/setting a proxy config, a network has to be selected using 23 // Before reading/setting a proxy config, a network has to be selected using
24 // either SetCurrentNetwork (any remembered network) or 24 // either SetCurrentNetwork (any remembered network) or
25 // MakeActiveNetworkCurrent. 25 // MakeActiveNetworkCurrent.
26 class UIProxyConfigService { 26 class UIProxyConfigService {
27 public: 27 public:
28 UIProxyConfigService(); 28 UIProxyConfigService();
29 ~UIProxyConfigService(); 29 ~UIProxyConfigService();
30 30
31 void SetPrefs(PrefService* prefs); 31 // |signin_screen| indicates whether this object is used for the
32 // signin screen. After this call, proxy settings are read from |prefs|.
33 void SetPrefs(bool signin_screen, PrefService* prefs);
Nikita (slow) 2013/07/15 08:08:46 nit: It would be helpful to describe how specifica
pneubeck (no reviews) 2013/07/16 08:38:06 Done.
32 34
33 // Called by UI to set the network with service path |current_network| to be 35 // Called by UI to set the network with service path |current_network| to be
34 // displayed or edited. Subsequent Set*/Get* methods will use this 36 // displayed or edited. Subsequent Set*/Get* methods will use this
35 // network, until this method is called again. 37 // network, until this method is called again.
36 void SetCurrentNetwork(const std::string& current_network); 38 void SetCurrentNetwork(const std::string& current_network);
37 39
38 // Called from UI to retrieve the stored proxy configuration, which is either 40 // Called from UI to retrieve the stored proxy configuration, which is either
39 // the last proxy config of the current network or the one last set by 41 // the last proxy config of the current network or the one last set by
40 // SetProxyConfig. 42 // SetProxyConfig.
41 void GetProxyConfig(UIProxyConfig* config) const; 43 void GetProxyConfig(UIProxyConfig* config) const;
42 44
43 // Called from UI to update proxy configuration for different modes. Stores 45 // Called from UI to update proxy configuration for different modes. Stores
44 // and persists |config| to shill for the current network. 46 // and persists |config| to shill for the current network.
45 void SetProxyConfig(const UIProxyConfig& config); 47 void SetProxyConfig(const UIProxyConfig& config);
46 48
47 private: 49 private:
48 // Determines effective proxy config based on prefs from config tracker, 50 // Determines effective proxy config based on prefs from config tracker,
49 // |network| and if user is using shared proxies. The effective config is 51 // |network| and if user is using shared proxies. The effective config is
50 // stored in |current_ui_config_| but not activated on network stack, and 52 // stored in |current_ui_config_| but not activated on network stack, and
51 // hence, not picked up by observers. 53 // hence, not picked up by observers.
52 void DetermineEffectiveConfig(const NetworkState& network); 54 void DetermineEffectiveConfig(const NetworkState& network);
53 55
54 // Service path of network whose proxy configuration is being displayed or 56 // Service path of network whose proxy configuration is being displayed or
55 // edited via UI. 57 // edited via UI.
56 std::string current_ui_network_; 58 std::string current_ui_network_;
57 59
58 // Proxy configuration of |current_ui_network_|. 60 // Proxy configuration of |current_ui_network_|.
59 UIProxyConfig current_ui_config_; 61 UIProxyConfig current_ui_config_;
60 62
63 bool signin_screen_;
61 PrefService* pref_service_; 64 PrefService* pref_service_;
62 65
63 DISALLOW_COPY_AND_ASSIGN(UIProxyConfigService); 66 DISALLOW_COPY_AND_ASSIGN(UIProxyConfigService);
64 }; 67 };
65 68
66 } // namespace chromeos 69 } // namespace chromeos
67 70
68 #endif // CHROME_BROWSER_CHROMEOS_UI_PROXY_CONFIG_SERVICE_H_ 71 #endif // CHROME_BROWSER_CHROMEOS_UI_PROXY_CONFIG_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698