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

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

Issue 2445153002: Move onc and proxy pref names to components. (Closed)
Patch Set: Rebase Created 4 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_CROS_SETTINGS_PARSER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_PROXY_CROS_SETTINGS_PARSER_H_
6 #define CHROME_BROWSER_CHROMEOS_PROXY_CROS_SETTINGS_PARSER_H_ 6 #define CHROME_BROWSER_CHROMEOS_PROXY_CROS_SETTINGS_PARSER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <string> 10 #include <string>
11 11
12 namespace base { 12 namespace base {
13 class Value; 13 class Value;
14 } 14 }
15 15
16 namespace chromeos { 16 namespace chromeos {
17 17
18 class UIProxyConfigService; 18 class UIProxyConfigService;
19 19
20 // This namespace defines helper functions for setting/getting Proxy settings.
emaxx 2016/10/26 01:34:30 nit: The comment should probably be corrected, as
stevenjb 2016/10/26 16:19:31 Done.
21 namespace proxy_cros_settings_parser {
22
20 extern const char kProxyPacUrl[]; 23 extern const char kProxyPacUrl[];
21 extern const char kProxySingleHttp[]; 24 extern const char kProxySingleHttp[];
22 extern const char kProxySingleHttpPort[]; 25 extern const char kProxySingleHttpPort[];
23 extern const char kProxyHttpUrl[]; 26 extern const char kProxyHttpUrl[];
24 extern const char kProxyHttpPort[]; 27 extern const char kProxyHttpPort[];
25 extern const char kProxyHttpsUrl[]; 28 extern const char kProxyHttpsUrl[];
26 extern const char kProxyHttpsPort[]; 29 extern const char kProxyHttpsPort[];
27 extern const char kProxyType[]; 30 extern const char kProxyType[];
28 extern const char kProxySingle[]; 31 extern const char kProxySingle[];
29 extern const char kProxyFtpUrl[]; 32 extern const char kProxyFtpUrl[];
30 extern const char kProxyFtpPort[]; 33 extern const char kProxyFtpPort[];
31 extern const char kProxySocks[]; 34 extern const char kProxySocks[];
32 extern const char kProxySocksPort[]; 35 extern const char kProxySocksPort[];
33 extern const char kProxyIgnoreList[]; 36 extern const char kProxyIgnoreList[];
34 extern const char kProxyUsePacUrl[]; 37 extern const char kProxyUsePacUrl[];
35 38
36 extern const char* const kProxySettings[]; 39 extern const char* const kProxySettings[];
37 extern const size_t kProxySettingsCount; 40 extern const size_t kProxySettingsCount;
38 41
39 // This namespace defines helper functions for setting/getting Proxy settings.
40 namespace proxy_cros_settings_parser {
41
42 // Returns true if the supplied |path| is a proxy preference name. 42 // Returns true if the supplied |path| is a proxy preference name.
43 bool IsProxyPref(const std::string& path); 43 bool IsProxyPref(const std::string& path);
44 44
45 // Sets a value in the current proxy configuration on the specified profile. 45 // Sets a value in the current proxy configuration on the specified profile.
46 void SetProxyPrefValue(const std::string& path, 46 void SetProxyPrefValue(const std::string& path,
47 const base::Value* in_value, 47 const base::Value* in_value,
48 UIProxyConfigService* config_service); 48 UIProxyConfigService* config_service);
49 49
50 // Gets a value from the current proxy configuration on the specified profile. 50 // Gets a value from the current proxy configuration on the specified profile.
51 bool GetProxyPrefValue(const UIProxyConfigService& config_service, 51 bool GetProxyPrefValue(const UIProxyConfigService& config_service,
52 const std::string& path, 52 const std::string& path,
53 base::Value** out_value); 53 base::Value** out_value);
54 54
55 } // namespace proxy_cros_settings_parser 55 } // namespace proxy_cros_settings_parser
56 56
57 } // namespace chromeos 57 } // namespace chromeos
58 58
59 #endif // CHROME_BROWSER_CHROMEOS_PROXY_CROS_SETTINGS_PARSER_H_ 59 #endif // CHROME_BROWSER_CHROMEOS_PROXY_CROS_SETTINGS_PARSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698