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

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

Issue 2734293002: s/IsSamePage/IsSameDocument for NavigationContext. (Closed)
Patch Set: Created 3 years, 9 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 #include "ios/web/web_state/navigation_context_impl.h" 5 #include "ios/web/web_state/navigation_context_impl.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 8
9 namespace web { 9 namespace web {
10 10
11 // static 11 // static
12 std::unique_ptr<NavigationContext> 12 std::unique_ptr<NavigationContext>
13 NavigationContextImpl::CreateNavigationContext(WebState* web_state, 13 NavigationContextImpl::CreateNavigationContext(WebState* web_state,
14 const GURL& url) { 14 const GURL& url) {
15 std::unique_ptr<NavigationContext> resut(new NavigationContextImpl( 15 std::unique_ptr<NavigationContext> resut(new NavigationContextImpl(
16 web_state, url, false /* is_same_page */, false /* is_error_page */)); 16 web_state, url, false /* is_same_document */, false /* is_error_page */));
17 return resut; 17 return resut;
18 } 18 }
19 19
20 // static 20 // static
21 std::unique_ptr<NavigationContext> 21 std::unique_ptr<NavigationContext>
22 NavigationContextImpl::CreateSamePageNavigationContext(WebState* web_state, 22 NavigationContextImpl::CreateSamePageNavigationContext(WebState* web_state,
23 const GURL& url) { 23 const GURL& url) {
24 std::unique_ptr<NavigationContext> result(new NavigationContextImpl( 24 std::unique_ptr<NavigationContext> result(new NavigationContextImpl(
25 web_state, url, true /* is_same_page */, false /* is_error_page */)); 25 web_state, url, true /* is_same_document */, false /* is_error_page */));
26 return result; 26 return result;
27 } 27 }
28 28
29 // static 29 // static
30 std::unique_ptr<NavigationContext> 30 std::unique_ptr<NavigationContext>
31 NavigationContextImpl::CreateErrorPageNavigationContext(WebState* web_state, 31 NavigationContextImpl::CreateErrorPageNavigationContext(WebState* web_state,
32 const GURL& url) { 32 const GURL& url) {
33 std::unique_ptr<NavigationContext> result(new NavigationContextImpl( 33 std::unique_ptr<NavigationContext> result(new NavigationContextImpl(
34 web_state, url, false /* is_same_page */, true /* is_error_page */)); 34 web_state, url, false /* is_same_document */, true /* is_error_page */));
35 return result; 35 return result;
36 } 36 }
37 37
38 WebState* NavigationContextImpl::GetWebState() { 38 WebState* NavigationContextImpl::GetWebState() {
39 return web_state_; 39 return web_state_;
40 } 40 }
41 41
42 const GURL& NavigationContextImpl::GetUrl() const { 42 const GURL& NavigationContextImpl::GetUrl() const {
43 return url_; 43 return url_;
44 } 44 }
45 45
46 bool NavigationContextImpl::IsSamePage() const { 46 bool NavigationContextImpl::IsSameDocument() const {
47 return is_same_page_; 47 return is_same_document_;
48 } 48 }
49 49
50 bool NavigationContextImpl::IsErrorPage() const { 50 bool NavigationContextImpl::IsErrorPage() const {
51 return is_error_page_; 51 return is_error_page_;
52 } 52 }
53 53
54 NavigationContextImpl::NavigationContextImpl(WebState* web_state, 54 NavigationContextImpl::NavigationContextImpl(WebState* web_state,
55 const GURL& url, 55 const GURL& url,
56 bool is_same_page, 56 bool is_same_document,
57 bool is_error_page) 57 bool is_error_page)
58 : web_state_(web_state), 58 : web_state_(web_state),
59 url_(url), 59 url_(url),
60 is_same_page_(is_same_page), 60 is_same_document_(is_same_document),
61 is_error_page_(is_error_page) {} 61 is_error_page_(is_error_page) {}
62 62
63 NavigationContextImpl::~NavigationContextImpl() = default; 63 NavigationContextImpl::~NavigationContextImpl() = default;
64 64
65 } // namespace web 65 } // 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