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

Side by Side Diff: ios/web/web_state/navigation_context_impl.mm

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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #import "ios/web/web_state/navigation_context_impl.h" 5 #import "ios/web/web_state/navigation_context_impl.h"
6 6
7 #import <Foundation/Foundation.h> 7 #import <Foundation/Foundation.h>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "net/http/http_response_headers.h" 10 #include "net/http/http_response_headers.h"
(...skipping 30 matching lines...) Expand all
41 } 41 }
42 42
43 ui::PageTransition NavigationContextImpl::GetPageTransition() const { 43 ui::PageTransition NavigationContextImpl::GetPageTransition() const {
44 return page_transition_; 44 return page_transition_;
45 } 45 }
46 46
47 bool NavigationContextImpl::IsSameDocument() const { 47 bool NavigationContextImpl::IsSameDocument() const {
48 return is_same_document_; 48 return is_same_document_;
49 } 49 }
50 50
51 bool NavigationContextImpl::IsPost() const {
52 return is_post_;
53 }
54
51 NSError* NavigationContextImpl::GetError() const { 55 NSError* NavigationContextImpl::GetError() const {
52 return error_; 56 return error_;
53 } 57 }
54 58
55 net::HttpResponseHeaders* NavigationContextImpl::GetResponseHeaders() const { 59 net::HttpResponseHeaders* NavigationContextImpl::GetResponseHeaders() const {
56 return response_headers_.get(); 60 return response_headers_.get();
57 } 61 }
58 62
59 void NavigationContextImpl::SetIsSameDocument(bool is_same_document) { 63 void NavigationContextImpl::SetIsSameDocument(bool is_same_document) {
60 is_same_document_ = is_same_document; 64 is_same_document_ = is_same_document;
61 } 65 }
62 66
67 void NavigationContextImpl::SetIsPost(bool is_post) {
68 is_post_ = is_post;
69 }
70
63 void NavigationContextImpl::SetError(NSError* error) { 71 void NavigationContextImpl::SetError(NSError* error) {
64 error_.reset(error); 72 error_.reset(error);
65 } 73 }
66 74
67 void NavigationContextImpl::SetResponseHeaders( 75 void NavigationContextImpl::SetResponseHeaders(
68 const scoped_refptr<net::HttpResponseHeaders>& response_headers) { 76 const scoped_refptr<net::HttpResponseHeaders>& response_headers) {
69 response_headers_ = response_headers; 77 response_headers_ = response_headers;
70 } 78 }
71 79
72 int NavigationContextImpl::GetNavigationItemUniqueID() const { 80 int NavigationContextImpl::GetNavigationItemUniqueID() const {
(...skipping 10 matching lines...) Expand all
83 : web_state_(web_state), 91 : web_state_(web_state),
84 url_(url), 92 url_(url),
85 page_transition_(page_transition), 93 page_transition_(page_transition),
86 is_same_document_(false), 94 is_same_document_(false),
87 error_(nil), 95 error_(nil),
88 response_headers_(nullptr) {} 96 response_headers_(nullptr) {}
89 97
90 NavigationContextImpl::~NavigationContextImpl() = default; 98 NavigationContextImpl::~NavigationContextImpl() = default;
91 99
92 } // namespace web 100 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/web_state/navigation_context_impl.h ('k') | ios/web/web_state/navigation_context_impl_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698