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

Unified Diff: extensions/browser/api/web_request/web_request_api_helpers.cc

Issue 2323993004: Remove use of deprecated base::ListValue::Append(Value*) overload in extensions. (Closed)
Patch Set: ... I hate C++ Created 4 years, 3 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: extensions/browser/api/web_request/web_request_api_helpers.cc
diff --git a/extensions/browser/api/web_request/web_request_api_helpers.cc b/extensions/browser/api/web_request/web_request_api_helpers.cc
index a4895d7d401f80bd7a67f6f2ea38c14205577f97..097d3a3a0e0fac9de7e6fb5dad7fd40271180bf0 100644
--- a/extensions/browser/api/web_request/web_request_api_helpers.cc
+++ b/extensions/browser/api/web_request/web_request_api_helpers.cc
@@ -1275,10 +1275,11 @@ void SendExtensionWebRequestStatusToHost(content::RenderProcessHost* host) {
}
// Converts the |name|, |value| pair of a http header to a HttpHeaders
-// dictionary. Ownership is passed to the caller.
-base::DictionaryValue* CreateHeaderDictionary(
- const std::string& name, const std::string& value) {
- base::DictionaryValue* header = new base::DictionaryValue();
+// dictionary.
+std::unique_ptr<base::DictionaryValue> CreateHeaderDictionary(
+ const std::string& name,
+ const std::string& value) {
+ std::unique_ptr<base::DictionaryValue> header(new base::DictionaryValue());
header->SetString(keys::kHeaderNameKey, name);
if (base::IsStringUTF8(value)) {
header->SetString(keys::kHeaderValueKey, value);
« no previous file with comments | « extensions/browser/api/web_request/web_request_api_helpers.h ('k') | extensions/browser/app_window/app_window_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698