| 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 base::Value* ExtensionToBrowserPref(const base::Value* extension_pref, | 35 std::unique_ptr<base::Value> ExtensionToBrowserPref( |
| 36 std::string* error, | 36 const base::Value* extension_pref, |
| 37 bool* bad_message) override; | 37 std::string* error, |
| 38 base::Value* BrowserToExtensionPref(const base::Value* browser_pref) override; | 38 bool* bad_message) override; |
| 39 std::unique_ptr<base::Value> BrowserToExtensionPref( |
| 40 const base::Value* browser_pref) override; |
| 39 | 41 |
| 40 private: | 42 private: |
| 41 DISALLOW_COPY_AND_ASSIGN(ProxyPrefTransformer); | 43 DISALLOW_COPY_AND_ASSIGN(ProxyPrefTransformer); |
| 42 }; | 44 }; |
| 43 | 45 |
| 44 // This class observes proxy error events and routes them to the appropriate | 46 // This class observes proxy error events and routes them to the appropriate |
| 45 // extensions listening to those events. All methods must be called on the IO | 47 // extensions listening to those events. All methods must be called on the IO |
| 46 // thread unless otherwise specified. | 48 // thread unless otherwise specified. |
| 47 class ProxyEventRouter { | 49 class ProxyEventRouter { |
| 48 public: | 50 public: |
| (...skipping 13 matching lines...) Expand all Loading... |
| 62 | 64 |
| 63 ProxyEventRouter(); | 65 ProxyEventRouter(); |
| 64 ~ProxyEventRouter(); | 66 ~ProxyEventRouter(); |
| 65 | 67 |
| 66 DISALLOW_COPY_AND_ASSIGN(ProxyEventRouter); | 68 DISALLOW_COPY_AND_ASSIGN(ProxyEventRouter); |
| 67 }; | 69 }; |
| 68 | 70 |
| 69 } // namespace extensions | 71 } // namespace extensions |
| 70 | 72 |
| 71 #endif // CHROME_BROWSER_EXTENSIONS_API_PROXY_PROXY_API_H_ | 73 #endif // CHROME_BROWSER_EXTENSIONS_API_PROXY_PROXY_API_H_ |
| OLD | NEW |