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

Unified Diff: chrome/browser/extensions/api/proxy/proxy_api_helpers.cc

Issue 10834004: Correct const accessors in base/values.(h|cc) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Reverting webdriver:Command::parameters_ to const Created 8 years, 5 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/api/proxy/proxy_api_helpers.cc
diff --git a/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc b/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
index 9405849be371d56f2d575ba9441612b9acaaaa25..2b1a44a62a1e3603fedecf10f225e03cd16430f3 100644
--- a/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
+++ b/chrome/browser/extensions/api/proxy/proxy_api_helpers.cc
@@ -80,7 +80,7 @@ bool GetPacMandatoryFromExtensionPref(const DictionaryValue* proxy_config,
bool* out,
std::string* error,
bool* bad_message){
- DictionaryValue* pac_dict = NULL;
+ const DictionaryValue* pac_dict = NULL;
proxy_config->GetDictionary(keys::kProxyConfigPacScript, &pac_dict);
if (!pac_dict)
return true;
@@ -101,7 +101,7 @@ bool GetPacUrlFromExtensionPref(const DictionaryValue* proxy_config,
std::string* out,
std::string* error,
bool* bad_message) {
- DictionaryValue* pac_dict = NULL;
+ const DictionaryValue* pac_dict = NULL;
proxy_config->GetDictionary(keys::kProxyConfigPacScript, &pac_dict);
if (!pac_dict)
return true;
@@ -127,7 +127,7 @@ bool GetPacDataFromExtensionPref(const DictionaryValue* proxy_config,
std::string* out,
std::string* error,
bool* bad_message) {
- DictionaryValue* pac_dict = NULL;
+ const DictionaryValue* pac_dict = NULL;
proxy_config->GetDictionary(keys::kProxyConfigPacScript, &pac_dict);
if (!pac_dict)
return true;
@@ -193,7 +193,7 @@ bool GetProxyRulesStringFromExtensionPref(const DictionaryValue* proxy_config,
std::string* out,
std::string* error,
bool* bad_message) {
- DictionaryValue* proxy_rules = NULL;
+ const DictionaryValue* proxy_rules = NULL;
proxy_config->GetDictionary(keys::kProxyConfigRules, &proxy_rules);
if (!proxy_rules)
return true;
@@ -208,7 +208,7 @@ bool GetProxyRulesStringFromExtensionPref(const DictionaryValue* proxy_config,
// singleProxy that will supersede per-URL proxies, but it's worth it to keep
// the code simple and extensible.
for (size_t i = 0; i <= keys::SCHEME_MAX; ++i) {
- DictionaryValue* proxy_dict = NULL;
+ const DictionaryValue* proxy_dict = NULL;
has_proxy[i] = proxy_rules->GetDictionary(keys::field_name[i],
&proxy_dict);
if (has_proxy[i]) {
@@ -256,7 +256,7 @@ bool GetProxyRulesStringFromExtensionPref(const DictionaryValue* proxy_config,
return true;
}
-bool JoinUrlList(ListValue* list,
+bool JoinUrlList(const ListValue* list,
const std::string& joiner,
std::string* out,
std::string* error,
@@ -288,7 +288,7 @@ bool GetBypassListFromExtensionPref(const DictionaryValue* proxy_config,
std::string *out,
std::string* error,
bool* bad_message) {
- DictionaryValue* proxy_rules = NULL;
+ const DictionaryValue* proxy_rules = NULL;
proxy_config->GetDictionary(keys::kProxyConfigRules, &proxy_rules);
if (!proxy_rules)
return true;
@@ -297,7 +297,7 @@ bool GetBypassListFromExtensionPref(const DictionaryValue* proxy_config,
*out = "";
return true;
}
- ListValue* bypass_list = NULL;
+ const ListValue* bypass_list = NULL;
if (!proxy_rules->GetList(keys::kProxyConfigBypassList, &bypass_list)) {
LOG(ERROR) << "'rules.bypassList' could not be parsed.";
*bad_message = true;
« no previous file with comments | « chrome/browser/extensions/api/proxy/proxy_api_helpers.h ('k') | chrome/browser/extensions/api/web_request/web_request_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698