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

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

Issue 2668883002: Convert NavigationMetricsRecorder to use the new navigation callbacks. (Closed)
Patch Set: Created 3 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 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 #include <string> 9 #include <string>
10 10
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 // successful commits or error pages that replace the previous page 169 // successful commits or error pages that replace the previous page
170 // (distinguished by |IsErrorPage|), and false for errors that leave the user 170 // (distinguished by |IsErrorPage|), and false for errors that leave the user
171 // on the previous page. 171 // on the previous page.
172 virtual bool HasCommitted() = 0; 172 virtual bool HasCommitted() = 0;
173 173
174 // Whether the navigation resulted in an error page. 174 // Whether the navigation resulted in an error page.
175 // Note that if an error page reloads, this will return true even though 175 // Note that if an error page reloads, this will return true even though
176 // GetNetErrorCode will be net::OK. 176 // GetNetErrorCode will be net::OK.
177 virtual bool IsErrorPage() = 0; 177 virtual bool IsErrorPage() = 0;
178 178
179 // The previous main frame URL that the user was on. This may be empty if
180 // there was no last committed entry.
181 virtual const GURL& GetPreviousURL() = 0;
182
179 // Returns the response headers for the request, or nullptr if there aren't 183 // Returns the response headers for the request, or nullptr if there aren't
180 // any response headers or they have not been received yet. The response 184 // any response headers or they have not been received yet. The response
181 // headers may change during the navigation (e.g. after encountering a server 185 // headers may change during the navigation (e.g. after encountering a server
182 // redirect). The headers returned should not be modified, as modifications 186 // redirect). The headers returned should not be modified, as modifications
183 // will not be reflected in the network stack. 187 // will not be reflected in the network stack.
184 virtual const net::HttpResponseHeaders* GetResponseHeaders() = 0; 188 virtual const net::HttpResponseHeaders* GetResponseHeaders() = 0;
185 189
186 // Returns the connection info for the request, the default value is 190 // Returns the connection info for the request, the default value is
187 // CONNECTION_INFO_UNKNOWN if there hasn't been a response (or redirect) 191 // CONNECTION_INFO_UNKNOWN if there hasn't been a response (or redirect)
188 // yet. The connection info may change during the navigation (e.g. after 192 // yet. The connection info may change during the navigation (e.g. after
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 260
257 // The NavigationData that the embedder returned from 261 // The NavigationData that the embedder returned from
258 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will 262 // ResourceDispatcherHostDelegate::GetNavigationData during commit. This will
259 // be a clone of the NavigationData. 263 // be a clone of the NavigationData.
260 virtual NavigationData* GetNavigationData() = 0; 264 virtual NavigationData* GetNavigationData() = 0;
261 }; 265 };
262 266
263 } // namespace content 267 } // namespace content
264 268
265 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_ 269 #endif // CONTENT_PUBLIC_BROWSER_NAVIGATION_HANDLE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698