Home | History | Annotate | Download | only in base

Lines Matching refs:NetLog

27 // NetLog is the destination for log messages generated by the network stack.
32 // To avoid needing to pass in the "source ID" to the logging functions, NetLog
36 // All methods are thread safe, with the exception that no NetLog or
37 // NetLog::ThreadSafeObserver functions may be called by an observer's
41 // https://sites.google.com/a/chromium.org/dev/developers/design-documents/network-stack/netlog
42 class NET_EXPORT NetLog {
97 // message groupings. Can use NetLog::NextID() to create unique IDs.
163 // being added to a NetLog.
168 // observe a single NetLog at a time.
173 // Observers must stop watching a NetLog before either the Observer or the
174 // NetLog is destroyed.
178 // receive. Must not be called when not watching a NetLog.
181 // Returns the NetLog we are currently watching, if any. Returns NULL
183 NetLog* net_log() const;
189 // It is illegal for an Observer to call any NetLog or
190 // NetLog::Observer functions in response to a call to OnAddEntry.
197 friend class NetLog;
199 // Both of these values are only modified by the NetLog.
201 NetLog* net_log_;
206 NetLog();
207 virtual ~NetLog();
212 const NetLog::ParametersCallback& parameters_callback);
218 // Returns the logging level for this NetLog. This is used to avoid computing
223 // watching any NetLog, including this one, when this is called.
230 // NetLog implementations must call NetLog::OnAddObserver to update the
235 // watching |this|. NetLog implementations must call
236 // NetLog::OnSetObserverLogLevel to update the observer's internal state.
239 // Removes an observer. NetLog implementations must call
240 // NetLog::OnAddObserver to update the observer's internal state.
246 // Converts a time to the string format that the NetLog uses to represent
308 const NetLog::ParametersCallback* parameters_callback);
330 DISALLOW_COPY_AND_ASSIGN(NetLog);
333 // Helper that binds a Source to a NetLog, and exposes convenience methods to
339 // Add a log entry to the NetLog for the bound source.
340 void AddEntry(NetLog::EventType type, NetLog::EventPhase phase) const;
341 void AddEntry(NetLog::EventType type,
342 NetLog::EventPhase phase,
343 const NetLog::ParametersCallback& get_parameters) const;
347 void BeginEvent(NetLog::EventType type) const;
348 void BeginEvent(NetLog::EventType type,
349 const NetLog::ParametersCallback& get_parameters) const;
351 void EndEvent(NetLog::EventType type) const;
352 void EndEvent(NetLog::EventType type,
353 const NetLog::ParametersCallback& get_parameters) const;
355 void AddEvent(NetLog::EventType type) const;
356 void AddEvent(NetLog::EventType type,
357 const NetLog::ParametersCallback& get_parameters) const;
363 void AddEventWithNetErrorCode(NetLog::EventType event_type,
370 void EndEventWithNetErrorCode(NetLog::EventType event_type,
373 // Logs a byte transfer event to the NetLog. Determines whether to log the
375 void AddByteTransferEvent(NetLog::EventType event_type,
378 NetLog::LogLevel GetLogLevel() const;
380 // Shortcut for NetLog::IsLoggingBytes(this->GetLogLevel()).
383 // Shortcut for NetLog::IsLoggingAllEvents(this->GetLogLevel()).
386 // Helper to create a BoundNetLog given a NetLog and a SourceType. Takes care
388 static BoundNetLog Make(NetLog* net_log, NetLog::SourceType source_type);
390 const NetLog::Source& source() const { return source_; }
391 NetLog* net_log() const { return net_log_; }
394 BoundNetLog(const NetLog::Source& source, NetLog* net_log)
398 NetLog::Source source_;
399 NetLog* net_log_;