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

Unified Diff: net/url_request/url_request.h

Issue 7602023: Use a monotonic clock (TimeTicks) to report network times to WebCore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build Created 9 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 side-by-side diff with in-line comments
Download patch
Index: net/url_request/url_request.h
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index 3deb198f58f4a938f09493f2ad41e03f588019c3..f94d465b4b5afc20d6d8d85cde1757a4c138639c 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -15,6 +15,7 @@
#include "base/memory/linked_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/string16.h"
+#include "base/time.h"
#include "base/threading/non_thread_safe.h"
#include "googleurl/src/gurl.h"
#include "net/base/auth.h"
@@ -50,6 +51,7 @@ class AppCacheURLRequestJobTest;
namespace base {
class Time;
+class TimeTicks;
} // namespace base
wtc 2011/12/10 01:02:54 If you include "base/time.h", please remove the fo
James Simonsen 2011/12/12 23:35:34 Done. Yeah, I saw that right after I uploaded the
// Temporary layering violation to allow existing users of a deprecated
@@ -456,6 +458,9 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe) {
// the response status line. Restrictions on GetResponseHeaders apply.
void GetAllResponseHeaders(std::string* headers);
+ // The time when |this| was constructed.
+ base::TimeTicks creation_time() const { return creation_time_; }
+
// The time at which the returned response was requested. For cached
// responses, this is the last time the cache entry was validated.
const base::Time& request_time() const {
@@ -814,6 +819,8 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe) {
AuthCredentials auth_credentials_;
scoped_refptr<AuthChallengeInfo> auth_info_;
+ base::TimeTicks creation_time_;
+
DISALLOW_COPY_AND_ASSIGN(URLRequest);
};

Powered by Google App Engine
This is Rietveld 408576698