Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: net/log/net_log_util.h

Issue 2333923004: Extracting NetLog inner classes into their own classes. (Closed)
Patch Set: Some nit fixes and better, impl-agnostic naming of net_log_parameters_callback_typedef.h -> net/log… Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_NET_LOG_UTIL_H_ 5 #ifndef NET_LOG_NET_LOG_UTIL_H_
6 #define NET_LOG_NET_LOG_UTIL_H_ 6 #define NET_LOG_NET_LOG_UTIL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <set> 9 #include <set>
10 10
(...skipping 27 matching lines...) Expand all
38 // |context|. |info_sources| is a set of NetInfoSources OR'd together, 38 // |context|. |info_sources| is a set of NetInfoSources OR'd together,
39 // indicating just what information is being requested. Each NetInfoSource adds 39 // indicating just what information is being requested. Each NetInfoSource adds
40 // one top-level entry to the returned dictionary. 40 // one top-level entry to the returned dictionary.
41 // 41 //
42 // May only be called on |context|'s thread. 42 // May only be called on |context|'s thread.
43 NET_EXPORT std::unique_ptr<base::DictionaryValue> GetNetInfo( 43 NET_EXPORT std::unique_ptr<base::DictionaryValue> GetNetInfo(
44 URLRequestContext* context, 44 URLRequestContext* context,
45 int info_sources); 45 int info_sources);
46 46
47 // Takes in a set of contexts and a NetLog::Observer, and passes in 47 // Takes in a set of contexts and a NetLog::Observer, and passes in
48 // NetLog::Entries to the observer for certain NetLog::Sources with pending 48 // NetLog::Entries to the observer for certain NetLogSources with pending
49 // events. This allows requests that were ongoing when logging was started to 49 // events. This allows requests that were ongoing when logging was started to
50 // have an initial event that has some information. This is particularly useful 50 // have an initial event that has some information. This is particularly useful
51 // for hung requests. Note that these calls are not protected by the NetLog's 51 // for hung requests. Note that these calls are not protected by the NetLog's
52 // lock, so this should generally be invoked before the observer starts watching 52 // lock, so this should generally be invoked before the observer starts watching
53 // the NetLog. 53 // the NetLog.
54 // 54 //
55 // All members of |contexts| must be using the same NetLog, and live on the 55 // All members of |contexts| must be using the same NetLog, and live on the
56 // current thread. 56 // current thread.
57 // 57 //
58 // Currently only creates events for URLRequests. 58 // Currently only creates events for URLRequests.
59 // 59 //
60 // The reason for not returning a list of NetLog::Entries is that entries don't 60 // The reason for not returning a list of NetLog::Entries is that entries don't
61 // own most of their data, so it's simplest just to pass them in to the observer 61 // own most of their data, so it's simplest just to pass them in to the observer
62 // directly while their data is on the stack. 62 // directly while their data is on the stack.
63 NET_EXPORT void CreateNetLogEntriesForActiveObjects( 63 NET_EXPORT void CreateNetLogEntriesForActiveObjects(
64 const std::set<URLRequestContext*>& contexts, 64 const std::set<URLRequestContext*>& contexts,
65 NetLog::ThreadSafeObserver* observer); 65 NetLog::ThreadSafeObserver* observer);
66 66
67 } // namespace net 67 } // namespace net
68 68
69 #endif // NET_LOG_NET_LOG_UTIL_H_ 69 #endif // NET_LOG_NET_LOG_UTIL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698