OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |