OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef NET_BASE_NET_LOG_UTIL_H_ |
| 6 #define NET_BASE_NET_LOG_UTIL_H_ |
| 7 |
| 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "net/base/net_export.h" |
| 10 |
| 11 namespace base { |
| 12 class DictionaryValue; |
| 13 class Value; |
| 14 } |
| 15 |
| 16 namespace net { |
| 17 |
| 18 class URLRequestContext; |
| 19 |
| 20 // A set of flags that can be OR'd together to request specific information |
| 21 // about the current state of the URLRequestContext. See GetNetInfo, below. |
| 22 enum NetInfoSource { |
| 23 #define NET_INFO_SOURCE(label, string, value) NET_INFO_ ## label = value, |
| 24 #include "net/base/net_info_source_list.h" |
| 25 #undef NET_INFO_SOURCE |
| 26 NET_INFO_ALL_SOURCES = -1, |
| 27 }; |
| 28 |
| 29 // Utility methods for creating NetLog dumps. |
| 30 |
| 31 // Create a dictionary containing legend for net/ constants. |
| 32 NET_EXPORT scoped_ptr<base::DictionaryValue> GetNetConstants(); |
| 33 |
| 34 // Retrieves a dictionary containing information about the current state of |
| 35 // |context|. |info_sources| is a set of NetInfoSources OR'd together, |
| 36 // indicating just what information is being requested. Each NetInfoSource adds |
| 37 // one top-level entry to the returned dictionary. |
| 38 NET_EXPORT scoped_ptr<base::DictionaryValue> GetNetInfo( |
| 39 URLRequestContext* context, int info_sources); |
| 40 |
| 41 } // namespace net |
| 42 |
| 43 #endif // NET_BASE_NET_LOG_UTIL_H_ |
OLD | NEW |