| 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_BASE_CAPTURING_NET_LOG_H_ | 5 #ifndef NET_BASE_CAPTURING_NET_LOG_H_ |
| 6 #define NET_BASE_CAPTURING_NET_LOG_H_ | 6 #define NET_BASE_CAPTURING_NET_LOG_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 // Attempt to retrieve an value of the specified type with the given name | 47 // Attempt to retrieve an value of the specified type with the given name |
| 48 // from |params|. Returns true on success, false on failure. Does not | 48 // from |params|. Returns true on success, false on failure. Does not |
| 49 // modify |value| on failure. | 49 // modify |value| on failure. |
| 50 bool GetStringValue(const std::string& name, std::string* value) const; | 50 bool GetStringValue(const std::string& name, std::string* value) const; |
| 51 bool GetIntegerValue(const std::string& name, int* value) const; | 51 bool GetIntegerValue(const std::string& name, int* value) const; |
| 52 | 52 |
| 53 // Same as GetIntegerValue, but returns the error code associated with a | 53 // Same as GetIntegerValue, but returns the error code associated with a |
| 54 // log entry. | 54 // log entry. |
| 55 bool GetNetErrorCode(int* value) const; | 55 bool GetNetErrorCode(int* value) const; |
| 56 | 56 |
| 57 // Returns the parameters as a JSON string, or empty string if there are no |
| 58 // parameters. |
| 59 std::string GetParamsJson() const; |
| 60 |
| 57 EventType type; | 61 EventType type; |
| 58 base::TimeTicks time; | 62 base::TimeTicks time; |
| 59 Source source; | 63 Source source; |
| 60 EventPhase phase; | 64 EventPhase phase; |
| 61 scoped_ptr<base::DictionaryValue> params; | 65 scoped_ptr<base::DictionaryValue> params; |
| 62 }; | 66 }; |
| 63 | 67 |
| 64 // Ordered set of entries that were logged. | 68 // Ordered set of entries that were logged. |
| 65 typedef std::vector<CapturedEntry> CapturedEntryList; | 69 typedef std::vector<CapturedEntry> CapturedEntryList; |
| 66 | 70 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 private: | 132 private: |
| 129 CapturingNetLog capturing_net_log_; | 133 CapturingNetLog capturing_net_log_; |
| 130 const BoundNetLog net_log_; | 134 const BoundNetLog net_log_; |
| 131 | 135 |
| 132 DISALLOW_COPY_AND_ASSIGN(CapturingBoundNetLog); | 136 DISALLOW_COPY_AND_ASSIGN(CapturingBoundNetLog); |
| 133 }; | 137 }; |
| 134 | 138 |
| 135 } // namespace net | 139 } // namespace net |
| 136 | 140 |
| 137 #endif // NET_BASE_CAPTURING_NET_LOG_H_ | 141 #endif // NET_BASE_CAPTURING_NET_LOG_H_ |
| OLD | NEW |