| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_EXTENSIONS_EXTENSION_PROXY_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PROXY_API_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PROXY_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PROXY_API_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "chrome/browser/extensions/extension_function.h" | 10 #include "chrome/browser/extensions/extension_function.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 }; | 35 }; |
| 36 ProxyServer() : scheme("http"), host(""), port(INVALID_PORT) {} | 36 ProxyServer() : scheme("http"), host(""), port(INVALID_PORT) {} |
| 37 | 37 |
| 38 // The scheme of the proxy URI itself. | 38 // The scheme of the proxy URI itself. |
| 39 std::string scheme; | 39 std::string scheme; |
| 40 std::string host; | 40 std::string host; |
| 41 int port; | 41 int port; |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 bool GetProxyServer(const DictionaryValue* dict, ProxyServer* proxy_server); | 44 bool GetProxyServer(const DictionaryValue* dict, ProxyServer* proxy_server); |
| 45 | 45 bool GetProxyRules(DictionaryValue* proxy_rules, std::string* out); |
| 46 bool ApplyMode(const std::string& mode, bool incognito); | |
| 47 bool ApplyPacScript(DictionaryValue* pac_dict, bool incognito); | |
| 48 bool ApplyProxyRules(DictionaryValue* proxy_rules, bool incognito); | |
| 49 }; | 46 }; |
| 50 | 47 |
| 51 class RemoveCustomProxySettingsFunction : public ProxySettingsFunction { | 48 class RemoveCustomProxySettingsFunction : public ProxySettingsFunction { |
| 52 public: | 49 public: |
| 53 virtual ~RemoveCustomProxySettingsFunction() {} | 50 virtual ~RemoveCustomProxySettingsFunction() {} |
| 54 virtual bool RunImpl(); | 51 virtual bool RunImpl(); |
| 55 | 52 |
| 56 DECLARE_EXTENSION_FUNCTION_NAME( | 53 DECLARE_EXTENSION_FUNCTION_NAME( |
| 57 "experimental.proxy.removeCustomProxySettings") | 54 "experimental.proxy.removeCustomProxySettings") |
| 58 }; | 55 }; |
| 59 | 56 |
| 60 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PROXY_API_H_ | 57 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PROXY_API_H_ |
| OLD | NEW |