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

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

Issue 1586833002: Convert Pass()→std::move() for iOS build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert accidental //base change Created 4 years, 11 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_item_impl.mm ('k') | ios/web/net/cert_verifier_block_adapter.cc » ('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>
10
9 #include "base/logging.h" 11 #include "base/logging.h"
10 #import "ios/web/navigation/crw_session_controller+private_constructors.h" 12 #import "ios/web/navigation/crw_session_controller+private_constructors.h"
11 #import "ios/web/navigation/crw_session_controller.h" 13 #import "ios/web/navigation/crw_session_controller.h"
12 #import "ios/web/navigation/crw_session_entry.h" 14 #import "ios/web/navigation/crw_session_entry.h"
13 #include "ios/web/navigation/navigation_item_impl.h" 15 #include "ios/web/navigation/navigation_item_impl.h"
14 #include "ios/web/navigation/navigation_manager_delegate.h" 16 #include "ios/web/navigation/navigation_manager_delegate.h"
15 #import "ios/web/navigation/navigation_manager_facade_delegate.h" 17 #import "ios/web/navigation/navigation_manager_facade_delegate.h"
16 #include "ios/web/public/load_committed_details.h" 18 #include "ios/web/public/load_committed_details.h"
17 #include "ios/web/public/navigation_item.h" 19 #include "ios/web/public/navigation_item.h"
18 #include "ios/web/public/web_state/web_state.h" 20 #include "ios/web/public/web_state/web_state.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 openerId:opener_id 69 openerId:opener_id
68 openedByDOM:opened_by_dom 70 openedByDOM:opened_by_dom
69 openerNavigationIndex:opener_navigation_index 71 openerNavigationIndex:opener_navigation_index
70 browserState:browser_state_] autorelease]); 72 browserState:browser_state_] autorelease]);
71 } 73 }
72 74
73 void NavigationManagerImpl::ReplaceSessionHistory( 75 void NavigationManagerImpl::ReplaceSessionHistory(
74 ScopedVector<web::NavigationItem> items, 76 ScopedVector<web::NavigationItem> items,
75 int current_index) { 77 int current_index) {
76 SetSessionController([[[CRWSessionController alloc] 78 SetSessionController([[[CRWSessionController alloc]
77 initWithNavigationItems:items.Pass() 79 initWithNavigationItems:std::move(items)
78 currentIndex:current_index 80 currentIndex:current_index
79 browserState:browser_state_] autorelease]); 81 browserState:browser_state_] autorelease]);
80 } 82 }
81 83
82 void NavigationManagerImpl::SetFacadeDelegate( 84 void NavigationManagerImpl::SetFacadeDelegate(
83 NavigationManagerFacadeDelegate* facade_delegate) { 85 NavigationManagerFacadeDelegate* facade_delegate) {
84 facade_delegate_ = facade_delegate; 86 facade_delegate_ = facade_delegate;
85 } 87 }
86 88
87 NavigationManagerFacadeDelegate* NavigationManagerImpl::GetFacadeDelegate() 89 NavigationManagerFacadeDelegate* NavigationManagerImpl::GetFacadeDelegate()
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 268
267 void NavigationManagerImpl::Reload(bool check_for_reposts) { 269 void NavigationManagerImpl::Reload(bool check_for_reposts) {
268 NavigationItem* item = GetVisibleItem(); 270 NavigationItem* item = GetVisibleItem();
269 WebState::OpenURLParams params(item->GetURL(), item->GetReferrer(), 271 WebState::OpenURLParams params(item->GetURL(), item->GetReferrer(),
270 CURRENT_TAB, ui::PAGE_TRANSITION_RELOAD, NO); 272 CURRENT_TAB, ui::PAGE_TRANSITION_RELOAD, NO);
271 delegate_->GetWebState()->OpenURL(params); 273 delegate_->GetWebState()->OpenURL(params);
272 } 274 }
273 275
274 scoped_ptr<std::vector<BrowserURLRewriter::URLRewriter>> 276 scoped_ptr<std::vector<BrowserURLRewriter::URLRewriter>>
275 NavigationManagerImpl::GetTransientURLRewriters() { 277 NavigationManagerImpl::GetTransientURLRewriters() {
276 return transient_url_rewriters_.Pass(); 278 return std::move(transient_url_rewriters_);
277 } 279 }
278 280
279 void NavigationManagerImpl::RemoveTransientURLRewriters() { 281 void NavigationManagerImpl::RemoveTransientURLRewriters() {
280 transient_url_rewriters_.reset(); 282 transient_url_rewriters_.reset();
281 } 283 }
282 284
283 void NavigationManagerImpl::CopyState( 285 void NavigationManagerImpl::CopyState(
284 NavigationManagerImpl* navigation_manager) { 286 NavigationManagerImpl* navigation_manager) {
285 SetSessionController( 287 SetSessionController(
286 [[navigation_manager->GetSessionController() copy] autorelease]); 288 [[navigation_manager->GetSessionController() copy] autorelease]);
287 } 289 }
288 290
289 } // namespace web 291 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/navigation/navigation_item_impl.mm ('k') | ios/web/net/cert_verifier_block_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698