Chromium Code Reviews

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: Use strong typing Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: net/url_request/url_request.h
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index 44b8d68041393a9712c00b4a6d3a31d56d59aba0..ac6a7ea3fca11e8c70a91a5a9dbce95d7a170035 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -50,6 +50,7 @@ class AppCacheURLRequestJobTest;
namespace base {
class Time;
+class TimeTicks;
} // namespace base
// Temporary layering violation to allow existing users of a deprecated
@@ -632,6 +633,8 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe) {
// unit tests outside of net :(.
URLRequestJob* job() { return job_; }
+ base::TimeTicks start_time() const { return start_time_; }
+
protected:
// Allow the URLRequestJob class to control the is_pending() flag.
void set_is_pending(bool value) { is_pending_ = value; }
@@ -814,6 +817,9 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe) {
AuthCredentials auth_credentials_;
scoped_refptr<AuthChallengeInfo> auth_info_;
+ // When this request was created.
+ base::TimeTicks start_time_;
+
DISALLOW_COPY_AND_ASSIGN(URLRequest);
};

Powered by Google App Engine