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

Unified Diff: ios/web/web_state/navigation_context_impl.h

Issue 2901633002: Replaced NavigationContext::IsErrorPage with NavigationContext::GetError (Closed)
Patch Set: 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 | « ios/web/web_state/navigation_callbacks_inttest.mm ('k') | ios/web/web_state/navigation_context_impl.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/web_state/navigation_context_impl.h
diff --git a/ios/web/web_state/navigation_context_impl.h b/ios/web/web_state/navigation_context_impl.h
index 2e3d3386c103656f529970d5479598c53d34d358..5ea8139e6db4fcc56441a2df181922f4347f0461 100644
--- a/ios/web/web_state/navigation_context_impl.h
+++ b/ios/web/web_state/navigation_context_impl.h
@@ -7,9 +7,10 @@
#include <memory>
+#import "base/mac/scoped_nsobject.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
-#include "ios/web/public/web_state/navigation_context.h"
+#import "ios/web/public/web_state/navigation_context.h"
#include "url/gurl.h"
namespace web {
@@ -32,13 +33,13 @@ class NavigationContextImpl : public NavigationContext {
WebState* GetWebState() override;
const GURL& GetUrl() const override;
bool IsSameDocument() const override;
- bool IsErrorPage() const override;
+ NSError* GetError() const override;
net::HttpResponseHeaders* GetResponseHeaders() const override;
~NavigationContextImpl() override;
// Setters for navigation context data members.
void SetIsSameDocument(bool is_same_document);
- void SetIsErrorPage(bool is_error_page);
+ void SetError(NSError* error);
void SetResponseHeaders(
const scoped_refptr<net::HttpResponseHeaders>& response_headers);
@@ -47,17 +48,12 @@ class NavigationContextImpl : public NavigationContext {
void SetNavigationItemUniqueID(int unique_id);
private:
- NavigationContextImpl(
- WebState* web_state,
- const GURL& url,
- bool is_same_page,
- bool is_error_page,
- const scoped_refptr<net::HttpResponseHeaders>& response_headers);
+ NavigationContextImpl(WebState* web_state, const GURL& url);
WebState* web_state_ = nullptr;
GURL url_;
bool is_same_document_ = false;
- bool is_error_page_ = false;
+ base::scoped_nsobject<NSError> error_;
scoped_refptr<net::HttpResponseHeaders> response_headers_;
int navigation_item_unique_id_ = -1;
« no previous file with comments | « ios/web/web_state/navigation_callbacks_inttest.mm ('k') | ios/web/web_state/navigation_context_impl.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698