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

Side by Side Diff: net/log/net_log.h

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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef NET_LOG_NET_LOG_H_ 5 #ifndef NET_LOG_NET_LOG_H_
6 #define NET_LOG_NET_LOG_H_ 6 #define NET_LOG_NET_LOG_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 #define SOURCE_TYPE(label) SOURCE_##label, 64 #define SOURCE_TYPE(label) SOURCE_##label,
65 #include "net/log/net_log_source_type_list.h" 65 #include "net/log/net_log_source_type_list.h"
66 #undef SOURCE_TYPE 66 #undef SOURCE_TYPE
67 SOURCE_COUNT 67 SOURCE_COUNT
68 }; 68 };
69 69
70 // A callback function that return a Value representation of the parameters 70 // A callback function that return a Value representation of the parameters
71 // associated with an event. If called, it will be called synchonously, 71 // associated with an event. If called, it will be called synchonously,
72 // so it need not have owning references. May be called more than once, or 72 // so it need not have owning references. May be called more than once, or
73 // not at all. May return NULL. 73 // not at all. May return NULL.
74 typedef base::Callback<base::Value*(NetLogCaptureMode)> ParametersCallback; 74 typedef base::Callback<scoped_ptr<base::Value>(NetLogCaptureMode)>
75 ParametersCallback;
75 76
76 // Identifies the entity that generated this log. The |id| field should 77 // Identifies the entity that generated this log. The |id| field should
77 // uniquely identify the source, and is used by log observers to infer 78 // uniquely identify the source, and is used by log observers to infer
78 // message groupings. Can use NetLog::NextID() to create unique IDs. 79 // message groupings. Can use NetLog::NextID() to create unique IDs.
79 struct NET_EXPORT Source { 80 struct NET_EXPORT Source {
80 static const uint32 kInvalidId; 81 static const uint32 kInvalidId;
81 82
82 Source(); 83 Source();
83 Source(SourceType type, uint32 id); 84 Source(SourceType type, uint32 id);
84 bool IsValid() const; 85 bool IsValid() const;
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 NetLog::Source source_; 389 NetLog::Source source_;
389 NetLog* net_log_; 390 NetLog* net_log_;
390 391
391 // TODO(eroman): Temporary until crbug.com/467797 is solved. 392 // TODO(eroman): Temporary until crbug.com/467797 is solved.
392 Liveness liveness_ = ALIVE; 393 Liveness liveness_ = ALIVE;
393 }; 394 };
394 395
395 } // namespace net 396 } // namespace net
396 397
397 #endif // NET_LOG_NET_LOG_H_ 398 #endif // NET_LOG_NET_LOG_H_
OLDNEW
« 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