| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |