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

Side by Side Diff: content/browser/frame_host/navigator.h

Issue 874353003: New TimeToFirstURLJob* navigation metrics now work with PlzNavigate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Final method name change. Created 5 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/time/time.h" 9 #include "base/time/time.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // response to the navigation request has been received). 131 // response to the navigation request has been received).
132 virtual void CommitNavigation(FrameTreeNode* frame_tree_node, 132 virtual void CommitNavigation(FrameTreeNode* frame_tree_node,
133 ResourceResponse* response, 133 ResourceResponse* response,
134 scoped_ptr<StreamHandle> body); 134 scoped_ptr<StreamHandle> body);
135 135
136 // PlzNavigate 136 // PlzNavigate
137 // Cancel a NavigationRequest for |frame_tree_node|. Called when 137 // Cancel a NavigationRequest for |frame_tree_node|. Called when
138 // |frame_tree_node| is destroyed. 138 // |frame_tree_node| is destroyed.
139 virtual void CancelNavigation(FrameTreeNode* frame_tree_node) {} 139 virtual void CancelNavigation(FrameTreeNode* frame_tree_node) {}
140 140
141 // Called when the first resource request for a given navigation is executed 141 // Called when the network stack started handling the navigation request
142 // so that it can be tracked into an histogram. 142 // so that the |timestamp| when it happened can be recorded into an histogram.
143 // The |url| is used to verify we're tracking the correct navigation.
144 // TODO(carlosk): once PlzNavigate is the only navigation implementation
145 // remove the URL parameter and rename this method to better suit its naming
146 // conventions.
143 virtual void LogResourceRequestTime( 147 virtual void LogResourceRequestTime(
144 base::TimeTicks timestamp, const GURL& url) {}; 148 base::TimeTicks timestamp, const GURL& url) {};
145 149
146 // Called to record the time it took to execute the before unload hook for the 150 // Called to record the time it took to execute the before unload hook for the
147 // current navigation. 151 // current navigation.
148 virtual void LogBeforeUnloadTime( 152 virtual void LogBeforeUnloadTime(
149 const base::TimeTicks& renderer_before_unload_start_time, 153 const base::TimeTicks& renderer_before_unload_start_time,
150 const base::TimeTicks& renderer_before_unload_end_time) {} 154 const base::TimeTicks& renderer_before_unload_end_time) {}
151 155
152 // PlzNavigate 156 // PlzNavigate
153 // Returns whether there is an ongoing navigation waiting for the BeforeUnload 157 // Returns whether there is an ongoing navigation waiting for the BeforeUnload
154 // event to execute in the renderer process. 158 // event to execute in the renderer process.
155 virtual bool IsWaitingForBeforeUnloadACK(FrameTreeNode* frame_tree_node); 159 virtual bool IsWaitingForBeforeUnloadACK(FrameTreeNode* frame_tree_node);
156 160
157 protected: 161 protected:
158 friend class base::RefCounted<Navigator>; 162 friend class base::RefCounted<Navigator>;
159 virtual ~Navigator() {} 163 virtual ~Navigator() {}
160 }; 164 };
161 165
162 } // namespace content 166 } // namespace content
163 167
164 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ 168 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_request.cc ('k') | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698