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

Unified Diff: chrome/browser/extensions/extension_proxy_api.h

Issue 6240013: Make proxy settings one atomic dictionary in the PrefStores such that modifications are atomic. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/out/Debug
Patch Set: Fixed Lint comment Created 9 years, 10 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_proxy_api.h
diff --git a/chrome/browser/extensions/extension_proxy_api.h b/chrome/browser/extensions/extension_proxy_api.h
index 8ac47966b10df6e58439faaa2f18cc9d95e3b5dd..ee98813c962a0a731174629352a79adcee08bff3 100644
--- a/chrome/browser/extensions/extension_proxy_api.h
+++ b/chrome/browser/extensions/extension_proxy_api.h
@@ -30,6 +30,7 @@ class UseCustomProxySettingsFunction : public ProxySettingsFunction {
DECLARE_EXTENSION_FUNCTION_NAME("experimental.proxy.useCustomProxySettings")
private:
+ // Temporary data container to pass structured elements between functions.
struct ProxyServer {
enum {
INVALID_PORT = -1
@@ -42,11 +43,15 @@ class UseCustomProxySettingsFunction : public ProxySettingsFunction {
int port;
};
+ // Converts a proxy server description |dict| as passed by the API caller
+ // (e.g. for the http proxy in the rules element) and converts it to a
+ // ProxyServer. Returns true if successful.
bool GetProxyServer(const DictionaryValue* dict, ProxyServer* proxy_server);
- bool ApplyMode(const std::string& mode, bool incognito);
- bool ApplyPacScript(DictionaryValue* pac_dict, bool incognito);
- bool ApplyProxyRules(DictionaryValue* proxy_rules, bool incognito);
+ // Converts a proxy "rules" element passed by the API caller into a proxy
+ // configuration string that can be used by the proxy subsystem (see
+ // proxy_config.h). Returns true if successful.
+ bool GetProxyRules(DictionaryValue* proxy_rules, std::string* out);
};
class RemoveCustomProxySettingsFunction : public ProxySettingsFunction {
« no previous file with comments | « chrome/browser/dom_ui/options/advanced_options_handler.cc ('k') | chrome/browser/extensions/extension_proxy_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698