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

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

Issue 1149763005: Change NetLog::ParametersCallback to return a scoped_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments on ownership removed Created 5 years, 7 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
« no previous file with comments | « content/browser/download/download_net_log_parameters.cc ('k') | net/base/address_list.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 73a8dd8fbf1236eab3ed2238bc2473bb7ba54590..020aa4f15d21d9eb44ffd1c2bc190ff4e2358138 100644
--- a/extensions/browser/api/web_request/web_request_api_helpers.cc
+++ b/extensions/browser/api/web_request/web_request_api_helpers.cc
@@ -217,10 +217,10 @@ net::NetLog::ParametersCallback CreateNetLogExtensionIdCallback(
}
// Creates NetLog parameters to indicate that an extension modified a request.
-// Caller takes ownership of returned value.
-base::Value* NetLogModificationCallback(const EventResponseDelta* delta,
- net::NetLogCaptureMode capture_mode) {
- base::DictionaryValue* dict = new base::DictionaryValue();
+scoped_ptr<base::Value> NetLogModificationCallback(
+ const EventResponseDelta* delta,
+ net::NetLogCaptureMode capture_mode) {
+ scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
dict->SetString("extension_id", delta->extension_id);
base::ListValue* modified_headers = new base::ListValue();
@@ -240,7 +240,7 @@ base::Value* NetLogModificationCallback(const EventResponseDelta* delta,
deleted_headers->Append(new base::StringValue(*key));
}
dict->Set("deleted_headers", deleted_headers);
- return dict;
+ return dict.Pass();
}
bool InDecreasingExtensionInstallationTimeOrder(
« no previous file with comments | « content/browser/download/download_net_log_parameters.cc ('k') | net/base/address_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698