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

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

Issue 2785883003: Use unique_ptr<DictionaryValue> in ProxyConfigDictionary (Closed)
Patch Set: one constructor Created 3 years, 9 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.cc
diff --git a/chrome/browser/extensions/api/proxy/proxy_api.cc b/chrome/browser/extensions/api/proxy/proxy_api.cc
index c2ad7f37bb291d80d482386b5a1c04e01f5af898..65cffbb33165fff78662edf8b750a8ac3bcf17fe 100644
--- a/chrome/browser/extensions/api/proxy/proxy_api.cc
+++ b/chrome/browser/extensions/api/proxy/proxy_api.cc
@@ -133,9 +133,10 @@ base::Value* ProxyPrefTransformer::ExtensionToBrowserPref(
return NULL;
}
- return helpers::CreateProxyConfigDict(
- mode_enum, pac_mandatory, pac_url, pac_data, proxy_rules_string,
- bypass_list, error);
+ return helpers::CreateProxyConfigDict(mode_enum, pac_mandatory, pac_url,
+ pac_data, proxy_rules_string,
+ bypass_list, error)
+ .release();
}
base::Value* ProxyPrefTransformer::BrowserToExtensionPref(
@@ -145,7 +146,8 @@ base::Value* ProxyPrefTransformer::BrowserToExtensionPref(
// This is a dictionary wrapper that exposes the proxy configuration stored in
// the browser preferences.
ProxyConfigDictionary config(
- static_cast<const base::DictionaryValue*>(browser_pref));
+ static_cast<const base::DictionaryValue*>(browser_pref)
+ ->CreateDeepCopy());
ProxyPrefs::ProxyMode mode;
if (!config.GetMode(&mode)) {

Powered by Google App Engine
This is Rietveld 408576698