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

Side by Side Diff: content/public/browser/navigation_handle.h

Issue 2174423004: Add page load metrics for no-store forward back navigations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update histograms.xml and add another histogram Created 4 years, 4 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 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_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_
6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ 6 #define CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 #include "content/public/browser/navigation_throttle.h" 11 #include "content/public/browser/navigation_throttle.h"
12 #include "content/public/common/referrer.h" 12 #include "content/public/common/referrer.h"
13 #include "net/base/net_errors.h" 13 #include "net/base/net_errors.h"
14 #include "ui/base/page_transition_types.h" 14 #include "ui/base/page_transition_types.h"
15 15
16 class GURL; 16 class GURL;
17 17
18 namespace net {
19 class HttpResponseHeaders;
20 } // namespace net
21
18 namespace content { 22 namespace content {
19 class NavigationData; 23 class NavigationData;
20 class NavigationThrottle; 24 class NavigationThrottle;
21 class RenderFrameHost; 25 class RenderFrameHost;
22 class WebContents; 26 class WebContents;
23 27
24 // A NavigationHandle tracks information related to a single navigation. 28 // A NavigationHandle tracks information related to a single navigation.
25 // NavigationHandles are provided to several WebContentsObserver methods to 29 // NavigationHandles are provided to several WebContentsObserver methods to
26 // allow observers to track specific navigations. Observers should clear any 30 // allow observers to track specific navigations. Observers should clear any
27 // references to a NavigationHandle at the time of 31 // references to a NavigationHandle at the time of
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 147
144 // Whether the navigation has committed. This returns true for either 148 // Whether the navigation has committed. This returns true for either
145 // successful commits or error pages that replace the previous page 149 // successful commits or error pages that replace the previous page
146 // (distinguished by |IsErrorPage|), and false for errors that leave the user 150 // (distinguished by |IsErrorPage|), and false for errors that leave the user
147 // on the previous page. 151 // on the previous page.
148 virtual bool HasCommitted() = 0; 152 virtual bool HasCommitted() = 0;
149 153
150 // Whether the navigation resulted in an error page. 154 // Whether the navigation resulted in an error page.
151 virtual bool IsErrorPage() = 0; 155 virtual bool IsErrorPage() = 0;
152 156
157 // Returns the response headers for the request or nullptr if there are none.
158 // This should only be accessed after a redirect was encountered or after the
159 // navigation is ready to commit. The headers returned should not be modified,
160 // as modifications will not be reflected in the network stack.
161 virtual const net::HttpResponseHeaders* GetResponseHeaders() = 0;
162
153 // Resumes a navigation that was previously deferred by a NavigationThrottle. 163 // Resumes a navigation that was previously deferred by a NavigationThrottle.
154 virtual void Resume() = 0; 164 virtual void Resume() = 0;
155 165
156 // Cancels a navigation that was previously deferred by a NavigationThrottle. 166 // Cancels a navigation that was previously deferred by a NavigationThrottle.
157 // |result| should be equal to NavigationThrottle::CANCEL or 167 // |result| should be equal to NavigationThrottle::CANCEL or
158 // NavigationThrottle::CANCEL_AND_IGNORE. 168 // NavigationThrottle::CANCEL_AND_IGNORE.
159 virtual void CancelDeferredNavigation( 169 virtual void CancelDeferredNavigation(
160 NavigationThrottle::ThrottleCheckResult result) = 0; 170 NavigationThrottle::ThrottleCheckResult result) = 0;
161 171
162 // Testing methods ---------------------------------------------------------- 172 // Testing methods ----------------------------------------------------------
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 208
199 // The NavigationData that the embedder returned from 209 // The NavigationData that the embedder returned from
200 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will 210 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will
201 // be a clone of the NavigationData. 211 // be a clone of the NavigationData.
202 virtual NavigationData* GetNavigationData() = 0; 212 virtual NavigationData* GetNavigationData() = 0;
203 }; 213 };
204 214
205 } // namespace content 215 } // namespace content
206 216
207 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ 217 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_handle_impl.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698