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

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: Fixed compilation. 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 void SetPrefs(bool login_profile, PrefService* prefs);
battre 2013/07/12 12:25:44 add comment? // |login_profile| indicates whether
pneubeck (no reviews) 2013/07/12 16:00:44 Done. Also renamed login_profile to signin_screen.
32 32
33 // Called by UI to set the network with service path |current_network| to be 33 // 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 34 // displayed or edited. Subsequent Set*/Get* methods will use this
35 // network, until this method is called again. 35 // network, until this method is called again.
36 void SetCurrentNetwork(const std::string& current_network); 36 void SetCurrentNetwork(const std::string& current_network);
37 37
38 // Called from UI to retrieve the stored proxy configuration, which is either 38 // 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 39 // the last proxy config of the current network or the one last set by
40 // SetProxyConfig. 40 // SetProxyConfig.
41 void GetProxyConfig(UIProxyConfig* config) const; 41 void GetProxyConfig(UIProxyConfig* config) const;
42 42
43 // Called from UI to update proxy configuration for different modes. Stores 43 // Called from UI to update proxy configuration for different modes. Stores
44 // and persists |config| to shill for the current network. 44 // and persists |config| to shill for the current network.
45 void SetProxyConfig(const UIProxyConfig& config); 45 void SetProxyConfig(const UIProxyConfig& config);
46 46
47 private: 47 private:
48 // Determines effective proxy config based on prefs from config tracker, 48 // Determines effective proxy config based on prefs from config tracker,
49 // |network| and if user is using shared proxies. The effective config is 49 // |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 50 // stored in |current_ui_config_| but not activated on network stack, and
51 // hence, not picked up by observers. 51 // hence, not picked up by observers.
52 void DetermineEffectiveConfig(const NetworkState& network); 52 void DetermineEffectiveConfig(const NetworkState& network);
53 53
54 // Service path of network whose proxy configuration is being displayed or 54 // Service path of network whose proxy configuration is being displayed or
55 // edited via UI. 55 // edited via UI.
56 std::string current_ui_network_; 56 std::string current_ui_network_;
57 57
58 // Proxy configuration of |current_ui_network_|. 58 // Proxy configuration of |current_ui_network_|.
59 UIProxyConfig current_ui_config_; 59 UIProxyConfig current_ui_config_;
60 60
61 bool login_profile_;
61 PrefService* pref_service_; 62 PrefService* pref_service_;
62 63
63 DISALLOW_COPY_AND_ASSIGN(UIProxyConfigService); 64 DISALLOW_COPY_AND_ASSIGN(UIProxyConfigService);
64 }; 65 };
65 66
66 } // namespace chromeos 67 } // namespace chromeos
67 68
68 #endif // CHROME_BROWSER_CHROMEOS_UI_PROXY_CONFIG_SERVICE_H_ 69 #endif // CHROME_BROWSER_CHROMEOS_UI_PROXY_CONFIG_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698