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

Unified Diff: ios/web/public/web_state/navigation_context.h

Issue 2903883002: Added NavigationContext::IsPost. (Closed)
Patch Set: Self review Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ios/web/test/web_int_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/public/web_state/navigation_context.h
diff --git a/ios/web/public/web_state/navigation_context.h b/ios/web/public/web_state/navigation_context.h
index ee7073b63b536424863b68a38991377ecb1da470..cbfcc19c42b6d3b7d925a0661e070ccdd7ed46f1 100644
--- a/ios/web/public/web_state/navigation_context.h
+++ b/ios/web/public/web_state/navigation_context.h
@@ -42,6 +42,15 @@ class NavigationContext {
// * same document history navigation
virtual bool IsSameDocument() const = 0;
+ // Whether the initial navigation is done using HTTP POST method. This will
+ // not change during the navigation (even after encountering a server
+ // redirect).
+ //
+ // Note: page and frame navigations can only be done using POST or GET
+ // methods Therefore API exposes only |bool IsPost()| as opposed to
+ // |const std::string& GetMethod()| method.
+ virtual bool IsPost() const = 0;
+
// Returns error if the navigation has failed.
virtual NSError* GetError() const = 0;
« no previous file with comments | « no previous file | ios/web/test/web_int_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698