| 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 15 matching lines...) Expand all Loading... |
| 26 // in the Proxy Settings API and the representation used in the PrefStores. | 26 // in the Proxy Settings API and the representation used in the PrefStores. |
| 27 // This plugs into the ExtensionPreferenceAPI to get and set proxy settings. | 27 // This plugs into the ExtensionPreferenceAPI to get and set proxy settings. |
| 28 class ProxyPrefTransformer : public PrefTransformerInterface { | 28 class ProxyPrefTransformer : public PrefTransformerInterface { |
| 29 public: | 29 public: |
| 30 ProxyPrefTransformer(); | 30 ProxyPrefTransformer(); |
| 31 virtual ~ProxyPrefTransformer(); | 31 virtual ~ProxyPrefTransformer(); |
| 32 | 32 |
| 33 // Implementation of PrefTransformerInterface. | 33 // Implementation of PrefTransformerInterface. |
| 34 virtual base::Value* ExtensionToBrowserPref(const base::Value* extension_pref, | 34 virtual base::Value* ExtensionToBrowserPref(const base::Value* extension_pref, |
| 35 std::string* error, | 35 std::string* error, |
| 36 bool* bad_message) OVERRIDE; | 36 bool* bad_message) override; |
| 37 virtual base::Value* BrowserToExtensionPref( | 37 virtual base::Value* BrowserToExtensionPref( |
| 38 const base::Value* browser_pref) OVERRIDE; | 38 const base::Value* browser_pref) override; |
| 39 | 39 |
| 40 private: | 40 private: |
| 41 DISALLOW_COPY_AND_ASSIGN(ProxyPrefTransformer); | 41 DISALLOW_COPY_AND_ASSIGN(ProxyPrefTransformer); |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 // 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 |
| 45 // 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 |
| 46 // thread unless otherwise specified. | 46 // thread unless otherwise specified. |
| 47 class ProxyEventRouter { | 47 class ProxyEventRouter { |
| 48 public: | 48 public: |
| (...skipping 13 matching lines...) Expand all Loading... |
| 62 | 62 |
| 63 ProxyEventRouter(); | 63 ProxyEventRouter(); |
| 64 ~ProxyEventRouter(); | 64 ~ProxyEventRouter(); |
| 65 | 65 |
| 66 DISALLOW_COPY_AND_ASSIGN(ProxyEventRouter); | 66 DISALLOW_COPY_AND_ASSIGN(ProxyEventRouter); |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 } // namespace extensions | 69 } // namespace extensions |
| 70 | 70 |
| 71 #endif // CHROME_BROWSER_EXTENSIONS_API_PROXY_PROXY_API_H_ | 71 #endif // CHROME_BROWSER_EXTENSIONS_API_PROXY_PROXY_API_H_ |
| OLD | NEW |