| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_BASE_NET_LOG_H_ | 5 #ifndef NET_BASE_NET_LOG_H_ |
| 6 #define NET_BASE_NET_LOG_H_ | 6 #define NET_BASE_NET_LOG_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 95 // Emits an event to the log stream. | 95 // Emits an event to the log stream. |
| 96 // |type| - The type of the event. | 96 // |type| - The type of the event. |
| 97 // |time| - The time when the event occurred. | 97 // |time| - The time when the event occurred. |
| 98 // |source| - The source that generated the event. | 98 // |source| - The source that generated the event. |
| 99 // |phase| - An optional parameter indicating whether this is the start/end | 99 // |phase| - An optional parameter indicating whether this is the start/end |
| 100 // of an action. | 100 // of an action. |
| 101 // |params| - Optional (may be NULL) parameters for this event. | 101 // |params| - Optional (may be NULL) parameters for this event. |
| 102 // The specific subclass of EventParameters is defined | 102 // The specific subclass of EventParameters is defined |
| 103 // by the contract for events of this |type|. | 103 // by the contract for events of this |type|. |
| 104 // TODO(eroman): Take a scoped_refptr<> instead. |
| 104 virtual void AddEntry(EventType type, | 105 virtual void AddEntry(EventType type, |
| 105 const base::TimeTicks& time, | 106 const base::TimeTicks& time, |
| 106 const Source& source, | 107 const Source& source, |
| 107 EventPhase phase, | 108 EventPhase phase, |
| 108 EventParameters* params) = 0; | 109 EventParameters* params) = 0; |
| 109 | 110 |
| 110 // Returns a unique ID which can be used as a source ID. | 111 // Returns a unique ID which can be used as a source ID. |
| 111 virtual uint32 NextID() = 0; | 112 virtual uint32 NextID() = 0; |
| 112 | 113 |
| 113 // Returns true if more complicated messages should be sent to the log. | 114 // Returns true if more complicated messages should be sent to the log. |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 virtual Value* ToValue() const; | 222 virtual Value* ToValue() const; |
| 222 | 223 |
| 223 private: | 224 private: |
| 224 const char* name_; | 225 const char* name_; |
| 225 const NetLog::Source value_; | 226 const NetLog::Source value_; |
| 226 }; | 227 }; |
| 227 | 228 |
| 228 } // namespace net | 229 } // namespace net |
| 229 | 230 |
| 230 #endif // NET_BASE_NET_LOG_H_ | 231 #endif // NET_BASE_NET_LOG_H_ |
| OLD | NEW |