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

Side by Side Diff: net/base/net_log.h

Issue 4067002: First pass at adding http/backend cache to NetLog (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Minor cleanup Created 10 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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_NET_LOG_H_ 5 #ifndef NET_BASE_NET_LOG_H_
6 #define NET_BASE_NET_LOG_H_ 6 #define NET_BASE_NET_LOG_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 // Convenience methods that call through to the NetLog, passing in the 186 // Convenience methods that call through to the NetLog, passing in the
187 // currently bound source, current time, and a fixed "capture phase" 187 // currently bound source, current time, and a fixed "capture phase"
188 // (begin, end, or none). 188 // (begin, end, or none).
189 void AddEvent(NetLog::EventType event_type, 189 void AddEvent(NetLog::EventType event_type,
190 const scoped_refptr<NetLog::EventParameters>& params) const; 190 const scoped_refptr<NetLog::EventParameters>& params) const;
191 void BeginEvent(NetLog::EventType event_type, 191 void BeginEvent(NetLog::EventType event_type,
192 const scoped_refptr<NetLog::EventParameters>& params) const; 192 const scoped_refptr<NetLog::EventParameters>& params) const;
193 void EndEvent(NetLog::EventType event_type, 193 void EndEvent(NetLog::EventType event_type,
194 const scoped_refptr<NetLog::EventParameters>& params) const; 194 const scoped_refptr<NetLog::EventParameters>& params) const;
195 195
196 // Just like EndEvent, except |net_error| is a net error code. If it's
197 // negative, a parameter called "net_error" with a value of |net_error| is
198 // associated with the event. Otherwise, the end event has no parameters.
199 // |net_error| must not be ERR_IO_PENDING, as it's not a true error.
200 void EndEventWithErrorCode(NetLog::EventType event_type, int net_error) const;
eroman 2011/01/05 02:39:06 nit: I suggest calling this "WithNetErrorCode" to
mmenke 2011/01/05 16:32:25 Done and done.
201
196 NetLog::LogLevel GetLogLevel() const; 202 NetLog::LogLevel GetLogLevel() const;
197 203
198 // Returns true if the log level is LOG_ALL. 204 // Returns true if the log level is LOG_ALL.
199 bool IsLoggingBytes() const; 205 bool IsLoggingBytes() const;
200 206
201 // Returns true if the log level is LOG_ALL or LOG_ALL_BUT_BYTES. 207 // Returns true if the log level is LOG_ALL or LOG_ALL_BUT_BYTES.
202 bool IsLoggingAllEvents() const; 208 bool IsLoggingAllEvents() const;
203 209
204 // Helper to create a BoundNetLog given a NetLog and a SourceType. Takes care 210 // Helper to create a BoundNetLog given a NetLog and a SourceType. Takes care
205 // of creating a unique source ID, and handles the case of NULL net_log. 211 // of creating a unique source ID, and handles the case of NULL net_log.
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 296
291 private: 297 private:
292 BoundNetLog net_log_; 298 BoundNetLog net_log_;
293 const NetLog::EventType event_type_; 299 const NetLog::EventType event_type_;
294 scoped_refptr<NetLog::EventParameters> end_event_params_; 300 scoped_refptr<NetLog::EventParameters> end_event_params_;
295 }; 301 };
296 302
297 } // namespace net 303 } // namespace net
298 304
299 #endif // NET_BASE_NET_LOG_H_ 305 #endif // NET_BASE_NET_LOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698