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

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

Issue 2881933003: Store NavigationItem's unique ID in navigation context. (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 unified diff | Download patch
« no previous file with comments | « ios/web/web_state/navigation_context_impl.h ('k') | ios/web/web_state/ui/crw_web_controller.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ios/web/web_state/navigation_context_impl.h" 5 #include "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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 58
59 void NavigationContextImpl::SetIsErrorPage(bool is_error_page) { 59 void NavigationContextImpl::SetIsErrorPage(bool is_error_page) {
60 is_error_page_ = is_error_page; 60 is_error_page_ = is_error_page;
61 } 61 }
62 62
63 void NavigationContextImpl::SetResponseHeaders( 63 void NavigationContextImpl::SetResponseHeaders(
64 const scoped_refptr<net::HttpResponseHeaders>& response_headers) { 64 const scoped_refptr<net::HttpResponseHeaders>& response_headers) {
65 response_headers_ = response_headers; 65 response_headers_ = response_headers;
66 } 66 }
67 67
68 int NavigationContextImpl::GetNavigationItemUniqueID() const {
69 return navigation_item_unique_id_;
70 }
71
72 void NavigationContextImpl::SetNavigationItemUniqueID(int unique_id) {
73 navigation_item_unique_id_ = unique_id;
74 }
75
68 NavigationContextImpl::NavigationContextImpl( 76 NavigationContextImpl::NavigationContextImpl(
69 WebState* web_state, 77 WebState* web_state,
70 const GURL& url, 78 const GURL& url,
71 bool is_same_document, 79 bool is_same_document,
72 bool is_error_page, 80 bool is_error_page,
73 const scoped_refptr<net::HttpResponseHeaders>& response_headers) 81 const scoped_refptr<net::HttpResponseHeaders>& response_headers)
74 : web_state_(web_state), 82 : web_state_(web_state),
75 url_(url), 83 url_(url),
76 is_same_document_(is_same_document), 84 is_same_document_(is_same_document),
77 is_error_page_(is_error_page), 85 is_error_page_(is_error_page),
78 response_headers_(response_headers) {} 86 response_headers_(response_headers) {}
79 87
80 NavigationContextImpl::~NavigationContextImpl() = default; 88 NavigationContextImpl::~NavigationContextImpl() = default;
81 89
82 } // namespace web 90 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/web_state/navigation_context_impl.h ('k') | ios/web/web_state/ui/crw_web_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698