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

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: Sync & Merge 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
« no previous file with comments | « content/test/render_view_fake_resources_test.cc ('k') | net/url_request/url_request.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..5e3ca8031d4e380eb4458e07852f560b6b9cb89a 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"
@@ -48,10 +49,6 @@ class AppCacheRequestHandlerTest;
class AppCacheURLRequestJobTest;
}
-namespace base {
-class Time;
-} // namespace base
-
// Temporary layering violation to allow existing users of a deprecated
// interface.
namespace fileapi {
@@ -456,6 +453,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 +814,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);
};
« no previous file with comments | « content/test/render_view_fake_resources_test.cc ('k') | net/url_request/url_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698