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

Side by Side Diff: ios/web/navigation/navigation_manager_impl.mm

Issue 1836793002: [ios] Moved WebLoadParams inside NavigationManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/navigation/navigation_manager_impl.h ('k') | ios/web/navigation/web_load_params.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/navigation/navigation_manager_impl.h" 5 #include "ios/web/navigation/navigation_manager_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 20 matching lines...) Expand all
31 url::Replacements<char> replacements; 31 url::Replacements<char> replacements;
32 replacements.ClearRef(); 32 replacements.ClearRef();
33 return existing_url.ReplaceComponents(replacements) == 33 return existing_url.ReplaceComponents(replacements) ==
34 new_url.ReplaceComponents(replacements); 34 new_url.ReplaceComponents(replacements);
35 } 35 }
36 36
37 } // anonymous namespace 37 } // anonymous namespace
38 38
39 namespace web { 39 namespace web {
40 40
41 NavigationManager::WebLoadParams::WebLoadParams(const GURL& url)
42 : url(url),
43 transition_type(ui::PAGE_TRANSITION_LINK),
44 is_renderer_initiated(false),
45 post_data(nil) {}
46
47 NavigationManager::WebLoadParams::~WebLoadParams() {}
48
49 NavigationManager::WebLoadParams::WebLoadParams(const WebLoadParams& other)
50 : url(other.url),
51 referrer(other.referrer),
52 transition_type(other.transition_type),
53 is_renderer_initiated(other.is_renderer_initiated),
54 extra_headers([other.extra_headers copy]),
55 post_data([other.post_data copy]) {}
56
57 NavigationManager::WebLoadParams& NavigationManager::WebLoadParams::operator=(
58 const WebLoadParams& other) {
59 url = other.url;
60 referrer = other.referrer;
61 is_renderer_initiated = other.is_renderer_initiated;
62 transition_type = other.transition_type;
63 extra_headers.reset([other.extra_headers copy]);
64 post_data.reset([other.post_data copy]);
65
66 return *this;
67 }
68
41 NavigationManagerImpl::NavigationManagerImpl( 69 NavigationManagerImpl::NavigationManagerImpl(
42 NavigationManagerDelegate* delegate, 70 NavigationManagerDelegate* delegate,
43 BrowserState* browser_state) 71 BrowserState* browser_state)
44 : delegate_(delegate), 72 : delegate_(delegate),
45 browser_state_(browser_state), 73 browser_state_(browser_state),
46 facade_delegate_(nullptr) { 74 facade_delegate_(nullptr) {
47 DCHECK(browser_state_); 75 DCHECK(browser_state_);
48 } 76 }
49 77
50 NavigationManagerImpl::~NavigationManagerImpl() { 78 NavigationManagerImpl::~NavigationManagerImpl() {
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 transient_url_rewriters_.reset(); 310 transient_url_rewriters_.reset();
283 } 311 }
284 312
285 void NavigationManagerImpl::CopyState( 313 void NavigationManagerImpl::CopyState(
286 NavigationManagerImpl* navigation_manager) { 314 NavigationManagerImpl* navigation_manager) {
287 SetSessionController( 315 SetSessionController(
288 [[navigation_manager->GetSessionController() copy] autorelease]); 316 [[navigation_manager->GetSessionController() copy] autorelease]);
289 } 317 }
290 318
291 } // namespace web 319 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/navigation/navigation_manager_impl.h ('k') | ios/web/navigation/web_load_params.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698