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

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

Issue 577963002: Add time-to-network histogram considering browser side navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR comments, added new hisogram, test and fixes. Created 6 years, 2 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 "content/common/content_export.h" 10 #include "content/common/content_export.h"
10 #include "content/public/browser/navigation_controller.h" 11 #include "content/public/browser/navigation_controller.h"
11 #include "ui/base/window_open_disposition.h" 12 #include "ui/base/window_open_disposition.h"
12 13
13 class GURL; 14 class GURL;
14 struct FrameHostMsg_BeginNavigation_Params; 15 struct FrameHostMsg_BeginNavigation_Params;
15 struct FrameHostMsg_DidCommitProvisionalLoad_Params; 16 struct FrameHostMsg_DidCommitProvisionalLoad_Params;
16 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params; 17 struct FrameHostMsg_DidFailProvisionalLoadWithError_Params;
17 18
18 namespace base { 19 namespace base {
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 const GlobalRequestID& transferred_global_request_id, 120 const GlobalRequestID& transferred_global_request_id,
120 bool should_replace_current_entry, 121 bool should_replace_current_entry,
121 bool user_gesture) {} 122 bool user_gesture) {}
122 123
123 // PlzNavigate 124 // PlzNavigate
124 // Signal |render_frame_host| that a navigation is ready to commit (the 125 // Signal |render_frame_host| that a navigation is ready to commit (the
125 // response to the navigation request has been received). 126 // response to the navigation request has been received).
126 virtual void CommitNavigation(RenderFrameHostImpl* render_frame_host, 127 virtual void CommitNavigation(RenderFrameHostImpl* render_frame_host,
127 const NavigationBeforeCommitInfo& info) {}; 128 const NavigationBeforeCommitInfo& info) {};
128 129
130 // PlzNavigate
131 // Called when the first resource request for a given navigation is executed
nasko 2014/09/24 00:48:06 nit: Is there a second/subsequent resource request
carlosk 2014/09/24 18:35:49 Can't there possibly be another one? I might be wr
nasko 2014/09/24 23:11:20 That is a good point. I was thinking of "navigatio
carlosk 2014/09/25 17:26:05 Cool. And in fact that makes me think I might nee
132 // so that we can time it.
133 // TODO(carlosk): replace the URL as a request-identifier with something more
134 // sure/consistent once we have this something available (PlzNavigate should
nasko 2014/09/24 00:48:06 nit: Let's try to avoid using "we".
carlosk 2014/09/24 18:35:49 In fact, given that this "more precise identifier"
135 // provide a request_id).
136 virtual void LogResourceRequestTime(
137 base::TimeTicks timestamp, const GURL& url) {};
138
129 protected: 139 protected:
130 friend class base::RefCounted<Navigator>; 140 friend class base::RefCounted<Navigator>;
131 virtual ~Navigator() {} 141 virtual ~Navigator() {}
132 }; 142 };
133 143
134 } // namespace content 144 } // namespace content
135 145
136 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_ 146 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATOR_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/navigator_impl.h » ('j') | content/browser/frame_host/navigator_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698