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

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

Issue 2457583007: [PageLoadMetrics] Create page load timing metrics for H2/QUIC/H1 pages (Closed)
Patch Set: Fix test Created 4 years, 1 month 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_NAVIGATION_HANDLE_IMPL_H_ 5 #ifndef CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_
6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ 6 #define CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_
7 7
8 #include "content/public/browser/navigation_handle.h" 8 #include "content/public/browser/navigation_handle.h"
9 9
10 #include <stddef.h> 10 #include <stddef.h>
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 const Referrer& GetReferrer() override; 99 const Referrer& GetReferrer() override;
100 bool HasUserGesture() override; 100 bool HasUserGesture() override;
101 ui::PageTransition GetPageTransition() override; 101 ui::PageTransition GetPageTransition() override;
102 bool IsExternalProtocol() override; 102 bool IsExternalProtocol() override;
103 net::Error GetNetErrorCode() override; 103 net::Error GetNetErrorCode() override;
104 RenderFrameHostImpl* GetRenderFrameHost() override; 104 RenderFrameHostImpl* GetRenderFrameHost() override;
105 bool IsSamePage() override; 105 bool IsSamePage() override;
106 bool HasCommitted() override; 106 bool HasCommitted() override;
107 bool IsErrorPage() override; 107 bool IsErrorPage() override;
108 const net::HttpResponseHeaders* GetResponseHeaders() override; 108 const net::HttpResponseHeaders* GetResponseHeaders() override;
109 net::HttpResponseInfo::ConnectionInfo GetConnectionInfo() override;
109 void Resume() override; 110 void Resume() override;
110 void CancelDeferredNavigation( 111 void CancelDeferredNavigation(
111 NavigationThrottle::ThrottleCheckResult result) override; 112 NavigationThrottle::ThrottleCheckResult result) override;
112 void RegisterThrottleForTesting( 113 void RegisterThrottleForTesting(
113 std::unique_ptr<NavigationThrottle> navigation_throttle) override; 114 std::unique_ptr<NavigationThrottle> navigation_throttle) override;
114 NavigationThrottle::ThrottleCheckResult CallWillStartRequestForTesting( 115 NavigationThrottle::ThrottleCheckResult CallWillStartRequestForTesting(
115 bool is_post, 116 bool is_post,
116 const Referrer& sanitized_referrer, 117 const Referrer& sanitized_referrer,
117 bool has_user_gesture, 118 bool has_user_gesture,
118 ui::PageTransition transition, 119 ui::PageTransition transition,
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 // Called when the URLRequest will be redirected in the network stack. 210 // Called when the URLRequest will be redirected in the network stack.
210 // |callback| will be called when all throttles check have completed. This 211 // |callback| will be called when all throttles check have completed. This
211 // will allow the caller to cancel the navigation or let it proceed. 212 // will allow the caller to cancel the navigation or let it proceed.
212 // This will also inform the delegate that the request was redirected. 213 // This will also inform the delegate that the request was redirected.
213 void WillRedirectRequest( 214 void WillRedirectRequest(
214 const GURL& new_url, 215 const GURL& new_url,
215 const std::string& new_method, 216 const std::string& new_method,
216 const GURL& new_referrer_url, 217 const GURL& new_referrer_url,
217 bool new_is_external_protocol, 218 bool new_is_external_protocol,
218 scoped_refptr<net::HttpResponseHeaders> response_headers, 219 scoped_refptr<net::HttpResponseHeaders> response_headers,
220 net::HttpResponseInfo::ConnectionInfo connection_info,
219 const ThrottleChecksFinishedCallback& callback); 221 const ThrottleChecksFinishedCallback& callback);
220 222
221 // Called when the URLRequest has delivered response headers and metadata. 223 // Called when the URLRequest has delivered response headers and metadata.
222 // |callback| will be called when all throttle checks have completed, 224 // |callback| will be called when all throttle checks have completed,
223 // allowing the caller to cancel the navigation or let it proceed. 225 // allowing the caller to cancel the navigation or let it proceed.
224 // NavigationHandle will not call |callback| with a result of DEFER. 226 // NavigationHandle will not call |callback| with a result of DEFER.
225 // If the result is PROCEED, then 'ReadyToCommitNavigation' will be called 227 // If the result is PROCEED, then 'ReadyToCommitNavigation' will be called
226 // with |render_frame_host| and |response_headers| just before calling 228 // with |render_frame_host| and |response_headers| just before calling
227 // |callback|. Should a transfer navigation happen, |transfer_callback| will 229 // |callback|. Should a transfer navigation happen, |transfer_callback| will
228 // be run on the IO thread. 230 // be run on the IO thread.
229 // PlzNavigate: transfer navigations are not possible. 231 // PlzNavigate: transfer navigations are not possible.
230 void WillProcessResponse( 232 void WillProcessResponse(
231 RenderFrameHostImpl* render_frame_host, 233 RenderFrameHostImpl* render_frame_host,
232 scoped_refptr<net::HttpResponseHeaders> response_headers, 234 scoped_refptr<net::HttpResponseHeaders> response_headers,
235 net::HttpResponseInfo::ConnectionInfo connection_info,
233 const SSLStatus& ssl_status, 236 const SSLStatus& ssl_status,
234 const GlobalRequestID& request_id, 237 const GlobalRequestID& request_id,
235 bool should_replace_current_entry, 238 bool should_replace_current_entry,
236 bool is_download, 239 bool is_download,
237 bool is_stream, 240 bool is_stream,
238 const base::Closure& transfer_callback, 241 const base::Closure& transfer_callback,
239 const ThrottleChecksFinishedCallback& callback); 242 const ThrottleChecksFinishedCallback& callback);
240 243
241 // Returns the FrameTreeNode this navigation is happening in. 244 // Returns the FrameTreeNode this navigation is happening in.
242 FrameTreeNode* frame_tree_node() { return frame_tree_node_; } 245 FrameTreeNode* frame_tree_node() { return frame_tree_node_; }
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 bool has_user_gesture_; 342 bool has_user_gesture_;
340 ui::PageTransition transition_; 343 ui::PageTransition transition_;
341 bool is_external_protocol_; 344 bool is_external_protocol_;
342 net::Error net_error_code_; 345 net::Error net_error_code_;
343 RenderFrameHostImpl* render_frame_host_; 346 RenderFrameHostImpl* render_frame_host_;
344 const bool is_renderer_initiated_; 347 const bool is_renderer_initiated_;
345 const bool is_same_page_; 348 const bool is_same_page_;
346 const bool is_srcdoc_; 349 const bool is_srcdoc_;
347 bool was_redirected_; 350 bool was_redirected_;
348 scoped_refptr<net::HttpResponseHeaders> response_headers_; 351 scoped_refptr<net::HttpResponseHeaders> response_headers_;
352 net::HttpResponseInfo::ConnectionInfo connection_info_;
349 353
350 // The original url of the navigation. This may differ from |url_| if the 354 // The original url of the navigation. This may differ from |url_| if the
351 // navigation encounters redirects. 355 // navigation encounters redirects.
352 const GURL original_url_; 356 const GURL original_url_;
353 357
354 // The HTTP method used for the navigation. 358 // The HTTP method used for the navigation.
355 std::string method_; 359 std::string method_;
356 360
357 // The POST body associated with this navigation. This will be null for GET 361 // The POST body associated with this navigation. This will be null for GET
358 // and/or other non-POST requests (or if a response to a POST request was a 362 // and/or other non-POST requests (or if a response to a POST request was a
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 bool started_from_context_menu_; 425 bool started_from_context_menu_;
422 426
423 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_; 427 base::WeakPtrFactory<NavigationHandleImpl> weak_factory_;
424 428
425 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl); 429 DISALLOW_COPY_AND_ASSIGN(NavigationHandleImpl);
426 }; 430 };
427 431
428 } // namespace content 432 } // namespace content
429 433
430 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_ 434 #endif // CONTENT_BROWSER_FRAME_HOST_NAVIGATION_HANDLE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698