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

Unified Diff: content/public/browser/navigation_handle.h

Issue 1424003006: DataReductionProxyNavigationThrottle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@merge-session-throttle
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: content/public/browser/navigation_handle.h
diff --git a/content/public/browser/navigation_handle.h b/content/public/browser/navigation_handle.h
index 0bfbca8c7115ebb8c566f501d010970fdd4f4a57..ed9a59a3b645a27160d364b70c64a630400c8d38 100644
--- a/content/public/browser/navigation_handle.h
+++ b/content/public/browser/navigation_handle.h
@@ -13,6 +13,10 @@
class GURL;
+namespace net {
+class HttpResponseHeaders;
+}
+
namespace content {
class NavigationThrottle;
class RenderFrameHost;
@@ -32,6 +36,10 @@ class CONTENT_EXPORT NavigationHandle {
// when encountering a server redirect.
virtual const GURL& GetURL() = 0;
+ // The original URL for this navigation. This is not modified, and may differ
+ // from GetURL after the navigation encounters a server redirect.
+ virtual const GURL& GetOriginalURL() = 0;
+
// Whether the navigation is taking place in the main frame or in a subframe.
// This remains constant over the navigation lifetime.
virtual bool IsInMainFrame() = 0;
@@ -70,6 +78,9 @@ class CONTENT_EXPORT NavigationHandle {
// handlers.
virtual bool IsExternalProtocol() = 0;
+ // Whether this navigation originated from a prefetch.
+ virtual bool IsPrefetch() = 0;
+
// Navigation control flow --------------------------------------------------
// The net error code if an error happened prior to commit. Otherwise it will
@@ -85,6 +96,12 @@ class CONTENT_EXPORT NavigationHandle {
// before the navigation has committed.
virtual bool IsSamePage() = 0;
+ // Returns the response headers for the request. This can only be accessed
+ // after a redirect was encountered or after the the navigation is ready to
+ // commit. It should not be modified, as modifications will not be reflected
+ // in the network stack.
+ virtual const net::HttpResponseHeaders* GetResponseHeaders();
+
// Whether the navigation has committed. This returns true for either
// successful commits or error pages that replace the previous page
// (distinguished by |IsErrorPage|), and false for errors that leave the user
« no previous file with comments | « content/browser/loader/navigation_resource_throttle.cc ('k') | content/public/browser/navigation_throttle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698