OLD | NEW |
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 // Defines the Chrome Extensions Proxy Settings API relevant classes to realize | 5 // Defines the Chrome Extensions Proxy Settings API relevant classes to realize |
6 // the API as specified in the extension API JSON. | 6 // the API as specified in the extension API JSON. |
7 | 7 |
8 #ifndef CHROME_BROWSER_EXTENSIONS_API_PROXY_PROXY_API_H_ | 8 #ifndef CHROME_BROWSER_EXTENSIONS_API_PROXY_PROXY_API_H_ |
9 #define CHROME_BROWSER_EXTENSIONS_API_PROXY_PROXY_API_H_ | 9 #define CHROME_BROWSER_EXTENSIONS_API_PROXY_PROXY_API_H_ |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 // Class to convert between the representation of proxy settings used | 26 // Class to convert between the representation of proxy settings used |
27 // in the Proxy Settings API and the representation used in the PrefStores. | 27 // in the Proxy Settings API and the representation used in the PrefStores. |
28 // This plugs into the ExtensionPreferenceAPI to get and set proxy settings. | 28 // This plugs into the ExtensionPreferenceAPI to get and set proxy settings. |
29 class ProxyPrefTransformer : public PrefTransformerInterface { | 29 class ProxyPrefTransformer : public PrefTransformerInterface { |
30 public: | 30 public: |
31 ProxyPrefTransformer(); | 31 ProxyPrefTransformer(); |
32 ~ProxyPrefTransformer() override; | 32 ~ProxyPrefTransformer() override; |
33 | 33 |
34 // Implementation of PrefTransformerInterface. | 34 // Implementation of PrefTransformerInterface. |
35 std::unique_ptr<base::Value> ExtensionToBrowserPref( | 35 base::Value* ExtensionToBrowserPref(const base::Value* extension_pref, |
36 const base::Value* extension_pref, | 36 std::string* error, |
37 std::string* error, | 37 bool* bad_message) override; |
38 bool* bad_message) override; | 38 base::Value* BrowserToExtensionPref(const base::Value* browser_pref) override; |
39 std::unique_ptr<base::Value> BrowserToExtensionPref( | |
40 const base::Value* browser_pref) override; | |
41 | 39 |
42 private: | 40 private: |
43 DISALLOW_COPY_AND_ASSIGN(ProxyPrefTransformer); | 41 DISALLOW_COPY_AND_ASSIGN(ProxyPrefTransformer); |
44 }; | 42 }; |
45 | 43 |
46 // This class observes proxy error events and routes them to the appropriate | 44 // This class observes proxy error events and routes them to the appropriate |
47 // extensions listening to those events. All methods must be called on the IO | 45 // extensions listening to those events. All methods must be called on the IO |
48 // thread unless otherwise specified. | 46 // thread unless otherwise specified. |
49 class ProxyEventRouter { | 47 class ProxyEventRouter { |
50 public: | 48 public: |
(...skipping 13 matching lines...) Expand all Loading... |
64 | 62 |
65 ProxyEventRouter(); | 63 ProxyEventRouter(); |
66 ~ProxyEventRouter(); | 64 ~ProxyEventRouter(); |
67 | 65 |
68 DISALLOW_COPY_AND_ASSIGN(ProxyEventRouter); | 66 DISALLOW_COPY_AND_ASSIGN(ProxyEventRouter); |
69 }; | 67 }; |
70 | 68 |
71 } // namespace extensions | 69 } // namespace extensions |
72 | 70 |
73 #endif // CHROME_BROWSER_EXTENSIONS_API_PROXY_PROXY_API_H_ | 71 #endif // CHROME_BROWSER_EXTENSIONS_API_PROXY_PROXY_API_H_ |
OLD | NEW |