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

Unified Diff: net/log/net_log.h

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/http/http_stream_parser.cc ('k') | net/log/net_log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/log/net_log.h
diff --git a/net/log/net_log.h b/net/log/net_log.h
index 3a1c7bcac663c2cb8979b91223c0803c8fef2bf7..6070041502a89839cf8dd49dd83d5a12b711370b 100644
--- a/net/log/net_log.h
+++ b/net/log/net_log.h
@@ -17,6 +17,7 @@
#include "base/strings/string16.h"
#include "base/synchronization/lock.h"
#include "base/time/time.h"
+#include "base/values.h"
#include "net/base/net_export.h"
#include "net/log/net_log_capture_mode.h"
@@ -71,7 +72,8 @@ class NET_EXPORT NetLog {
// associated with an event. If called, it will be called synchonously,
// so it need not have owning references. May be called more than once, or
// not at all. May return NULL.
- typedef base::Callback<base::Value*(NetLogCaptureMode)> ParametersCallback;
+ typedef base::Callback<scoped_ptr<base::Value>(NetLogCaptureMode)>
+ ParametersCallback;
// Identifies the entity that generated this log. The |id| field should
// uniquely identify the source, and is used by log observers to infer
@@ -131,11 +133,11 @@ class NET_EXPORT NetLog {
// Serializes the specified event to a Value. The Value also includes the
// current time. Caller takes ownership of returned Value. Takes in a time
// to allow back-dating entries.
- base::Value* ToValue() const;
+ scoped_ptr<base::Value> ToValue() const;
// Returns the parameters as a Value. Returns NULL if there are no
// parameters. Caller takes ownership of returned Value.
- base::Value* ParametersToValue() const;
+ scoped_ptr<base::Value> ParametersToValue() const;
private:
const EntryData* const data_;
« no previous file with comments | « net/http/http_stream_parser.cc ('k') | net/log/net_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698