OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_TEST_NET_LOG_ENTRY_H_ | 5 #ifndef NET_LOG_TEST_NET_LOG_ENTRY_H_ |
6 #define NET_LOG_TEST_NET_LOG_ENTRY_H_ | 6 #define NET_LOG_TEST_NET_LOG_ENTRY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 // Equality operator needed to store in a std::vector because of the | 41 // Equality operator needed to store in a std::vector because of the |
42 // scoped_ptr. | 42 // scoped_ptr. |
43 TestNetLogEntry& operator=(const TestNetLogEntry& entry); | 43 TestNetLogEntry& operator=(const TestNetLogEntry& entry); |
44 | 44 |
45 // Attempt to retrieve an value of the specified type with the given name | 45 // Attempt to retrieve an value of the specified type with the given name |
46 // from |params|. Returns true on success, false on failure. Does not | 46 // from |params|. Returns true on success, false on failure. Does not |
47 // modify |value| on failure. | 47 // modify |value| on failure. |
48 bool GetStringValue(const std::string& name, std::string* value) const; | 48 bool GetStringValue(const std::string& name, std::string* value) const; |
49 bool GetIntegerValue(const std::string& name, int* value) const; | 49 bool GetIntegerValue(const std::string& name, int* value) const; |
| 50 bool GetBooleanValue(const std::string& name, bool* value) const; |
50 bool GetListValue(const std::string& name, base::ListValue** value) const; | 51 bool GetListValue(const std::string& name, base::ListValue** value) const; |
51 | 52 |
52 // Same as GetIntegerValue, but returns the error code associated with a | 53 // Same as GetIntegerValue, but returns the error code associated with a |
53 // log entry. | 54 // log entry. |
54 bool GetNetErrorCode(int* value) const; | 55 bool GetNetErrorCode(int* value) const; |
55 | 56 |
56 // Returns the parameters as a JSON string, or empty string if there are no | 57 // Returns the parameters as a JSON string, or empty string if there are no |
57 // parameters. | 58 // parameters. |
58 std::string GetParamsJson() const; | 59 std::string GetParamsJson() const; |
59 | 60 |
60 NetLog::EventType type; | 61 NetLog::EventType type; |
61 base::TimeTicks time; | 62 base::TimeTicks time; |
62 NetLog::Source source; | 63 NetLog::Source source; |
63 NetLog::EventPhase phase; | 64 NetLog::EventPhase phase; |
64 scoped_ptr<base::DictionaryValue> params; | 65 scoped_ptr<base::DictionaryValue> params; |
65 }; | 66 }; |
66 | 67 |
67 } // namespace net | 68 } // namespace net |
68 | 69 |
69 #endif // NET_LOG_TEST_NET_LOG_ENTRY_H_ | 70 #endif // NET_LOG_TEST_NET_LOG_ENTRY_H_ |
OLD | NEW |