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

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: ONC_EXPORT 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 and pref names for setting/getting a
21 // Proxy configuration. These prefs are not directly read from or written to the
22 // pref store, but instead are passed to/from UIProxyConfigService.
23
24 namespace proxy_cros_settings_parser {
25
20 extern const char kProxyPacUrl[]; 26 extern const char kProxyPacUrl[];
21 extern const char kProxySingleHttp[]; 27 extern const char kProxySingleHttp[];
22 extern const char kProxySingleHttpPort[]; 28 extern const char kProxySingleHttpPort[];
23 extern const char kProxyHttpUrl[]; 29 extern const char kProxyHttpUrl[];
24 extern const char kProxyHttpPort[]; 30 extern const char kProxyHttpPort[];
25 extern const char kProxyHttpsUrl[]; 31 extern const char kProxyHttpsUrl[];
26 extern const char kProxyHttpsPort[]; 32 extern const char kProxyHttpsPort[];
27 extern const char kProxyType[]; 33 extern const char kProxyType[];
28 extern const char kProxySingle[]; 34 extern const char kProxySingle[];
29 extern const char kProxyFtpUrl[]; 35 extern const char kProxyFtpUrl[];
30 extern const char kProxyFtpPort[]; 36 extern const char kProxyFtpPort[];
31 extern const char kProxySocks[]; 37 extern const char kProxySocks[];
32 extern const char kProxySocksPort[]; 38 extern const char kProxySocksPort[];
33 extern const char kProxyIgnoreList[]; 39 extern const char kProxyIgnoreList[];
34 extern const char kProxyUsePacUrl[]; 40 extern const char kProxyUsePacUrl[];
35 41
36 extern const char* const kProxySettings[]; 42 extern const char* const kProxySettings[];
37 extern const size_t kProxySettingsCount; 43 extern const size_t kProxySettingsCount;
38 44
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. 45 // Returns true if the supplied |path| is a proxy preference name.
43 bool IsProxyPref(const std::string& path); 46 bool IsProxyPref(const std::string& path);
44 47
45 // Sets a value in the current proxy configuration on the specified profile. 48 // Sets a value in the current proxy configuration on the specified profile.
46 void SetProxyPrefValue(const std::string& path, 49 void SetProxyPrefValue(const std::string& path,
47 const base::Value* in_value, 50 const base::Value* in_value,
48 UIProxyConfigService* config_service); 51 UIProxyConfigService* config_service);
49 52
50 // Gets a value from the current proxy configuration on the specified profile. 53 // Gets a value from the current proxy configuration on the specified profile.
51 bool GetProxyPrefValue(const UIProxyConfigService& config_service, 54 bool GetProxyPrefValue(const UIProxyConfigService& config_service,
52 const std::string& path, 55 const std::string& path,
53 base::Value** out_value); 56 base::Value** out_value);
54 57
55 } // namespace proxy_cros_settings_parser 58 } // namespace proxy_cros_settings_parser
56 59
57 } // namespace chromeos 60 } // namespace chromeos
58 61
59 #endif // CHROME_BROWSER_CHROMEOS_PROXY_CROS_SETTINGS_PARSER_H_ 62 #endif // CHROME_BROWSER_CHROMEOS_PROXY_CROS_SETTINGS_PARSER_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/proxy_config_service_impl_unittest.cc ('k') | chrome/browser/chromeos/proxy_cros_settings_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698