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

Side by Side Diff: chrome/browser/prefs/proxy_config_dictionary.cc

Issue 6468002: Implementation of getCurrentProxySettings for proxy settings API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/out/Debug
Patch Set: Removed todo and ask mpcomplete now. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/extension_proxy_api.cc ('k') | chrome/browser/prefs/proxy_prefs.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #include "chrome/browser/prefs/proxy_config_dictionary.h" 5 #include "chrome/browser/prefs/proxy_config_dictionary.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 10
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 return CreateDictionary(ProxyPrefs::MODE_SYSTEM, "", "", ""); 80 return CreateDictionary(ProxyPrefs::MODE_SYSTEM, "", "", "");
81 } 81 }
82 82
83 // static 83 // static
84 DictionaryValue* ProxyConfigDictionary::CreateDictionary( 84 DictionaryValue* ProxyConfigDictionary::CreateDictionary(
85 ProxyPrefs::ProxyMode mode, 85 ProxyPrefs::ProxyMode mode,
86 const std::string& pac_url, 86 const std::string& pac_url,
87 const std::string& proxy_server, 87 const std::string& proxy_server,
88 const std::string& bypass_list) { 88 const std::string& bypass_list) {
89 DictionaryValue* dict = new DictionaryValue(); 89 DictionaryValue* dict = new DictionaryValue();
90 dict->SetString(kProxyMode, GetProxyModeName(mode)); 90 dict->SetString(kProxyMode, ProxyModeToString(mode));
91 if (!pac_url.empty()) 91 if (!pac_url.empty())
92 dict->SetString(kProxyPacUrl, pac_url); 92 dict->SetString(kProxyPacUrl, pac_url);
93 if (!proxy_server.empty()) 93 if (!proxy_server.empty())
94 dict->SetString(kProxyServer, proxy_server); 94 dict->SetString(kProxyServer, proxy_server);
95 if (!bypass_list.empty()) 95 if (!bypass_list.empty())
96 dict->SetString(kProxyBypassList, bypass_list); 96 dict->SetString(kProxyBypassList, bypass_list);
97 return dict; 97 return dict;
98 } 98 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_proxy_api.cc ('k') | chrome/browser/prefs/proxy_prefs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698