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

Unified Diff: content/common/resource_dispatcher.h

Issue 14646006: Inject timestamps to resource messages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nit. Added distinct ChildResourceFilter back. Created 7 years, 7 months 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/common/child_thread.cc ('k') | content/common/resource_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/resource_dispatcher.h
diff --git a/content/common/resource_dispatcher.h b/content/common/resource_dispatcher.h
index 141e89c188c4b102c01f4a61bdfbbdc6dd43c288..ca510c4813442be62142f7dfd9b7d06914cc1bde 100644
--- a/content/common/resource_dispatcher.h
+++ b/content/common/resource_dispatcher.h
@@ -71,6 +71,11 @@ class CONTENT_EXPORT ResourceDispatcher : public IPC::Listener {
delegate_ = delegate;
}
+ // Remembers IO thread timestamp for next resource message.
+ void set_io_timestamp(base::TimeTicks io_timestamp) {
+ io_timestamp_ = io_timestamp;
+ }
+
private:
friend class ResourceDispatcherTest;
@@ -157,6 +162,11 @@ class CONTENT_EXPORT ResourceDispatcher : public IPC::Listener {
const PendingRequestInfo& request_info,
const base::TimeTicks& browser_completion_time) const;
+ // Returns timestamp provided by IO thread. If no timestamp is supplied,
+ // then current time is returned. Saved timestamp is reset, so follofing
jam 2013/05/28 23:00:15 nit: spelling
eustas 2013/05/29 08:31:25 Done.
+ // invocations will return current time until set_io_timestamp is called.
+ base::TimeTicks consume_io_timestamp();
jam 2013/05/28 23:00:15 nit: per style guide, since this isn't implemented
eustas 2013/05/29 08:31:25 Done.
+
// Returns true if the message passed in is a resource related message.
static bool IsResourceDispatcherMessage(const IPC::Message& message);
@@ -180,6 +190,9 @@ class CONTENT_EXPORT ResourceDispatcher : public IPC::Listener {
ResourceDispatcherDelegate* delegate_;
+ // IO thread timestamp for ongoing IPC message.
+ base::TimeTicks io_timestamp_;
+
DISALLOW_COPY_AND_ASSIGN(ResourceDispatcher);
};
« no previous file with comments | « content/common/child_thread.cc ('k') | content/common/resource_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698