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

Unified Diff: net/http/http_cache_transaction.cc

Issue 1135373002: Updated NetLog::ParametersCallback & all related calbacks returning value as scoped_ptr<base::Value… Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « net/ftp/ftp_ctrl_response_buffer.cc ('k') | net/http/http_network_transaction.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_cache_transaction.cc
diff --git a/net/http/http_cache_transaction.cc b/net/http/http_cache_transaction.cc
index 90a984613adf8d5e58becb8a643e22a33465c667..485ccf5be258a6bee4749da791f50f50625542c0 100644
--- a/net/http/http_cache_transaction.cc
+++ b/net/http/http_cache_transaction.cc
@@ -182,16 +182,16 @@ void RecordNoStoreHeaderHistogram(int load_flags,
}
}
-base::Value* NetLogAsyncRevalidationInfoCallback(
+scoped_ptr<base::Value> NetLogAsyncRevalidationInfoCallback(
const NetLog::Source& source,
const HttpRequestInfo* request,
NetLogCaptureMode capture_mode) {
- base::DictionaryValue* dict = new base::DictionaryValue();
- source.AddToEventParameters(dict);
+ scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue());
+ source.AddToEventParameters(dict.get());
dict->SetString("url", request->url.possibly_invalid_spec());
dict->SetString("method", request->method);
- return dict;
+ return dict.Pass();
}
enum ExternallyConditionalizedType {
@@ -2611,8 +2611,8 @@ void HttpCache::Transaction::TriggerAsyncValidation() {
async_revalidation_net_log.source().ToEventParametersCallback());
async_revalidation_net_log.BeginEvent(
NetLog::TYPE_ASYNC_REVALIDATION,
- base::Bind(
- &NetLogAsyncRevalidationInfoCallback, net_log_.source(), request_));
+ base::Bind(NetLogAsyncRevalidationInfoCallback, net_log_.source(),
+ request_));
base::MessageLoop::current()->PostTask(
FROM_HERE,
base::Bind(&HttpCache::PerformAsyncValidation,
« no previous file with comments | « net/ftp/ftp_ctrl_response_buffer.cc ('k') | net/http/http_network_transaction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698