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

Side by Side Diff: ios/web/public/web_controller_factory.mm

Issue 1861593005: Convert //ios from scoped_ptr to std::unique_ptr. (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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #import "ios/web/public/web_controller_factory.h" 5 #import "ios/web/public/web_controller_factory.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ios/web/public/browser_state.h" 9 #include "ios/web/public/browser_state.h"
10 #import "ios/web/web_state/ui/crw_wk_web_view_web_controller.h" 10 #import "ios/web/web_state/ui/crw_wk_web_view_web_controller.h"
11 #include "ios/web/web_state/web_state_impl.h" 11 #include "ios/web/web_state/web_state_impl.h"
12 12
13 namespace web { 13 namespace web {
14 14
15 CRWWebController* CreateWebController(scoped_ptr<WebStateImpl> web_state) { 15 CRWWebController* CreateWebController(std::unique_ptr<WebStateImpl> web_state) {
16 return 16 return
17 [[CRWWKWebViewWebController alloc] initWithWebState:std::move(web_state)]; 17 [[CRWWKWebViewWebController alloc] initWithWebState:std::move(web_state)];
18 } 18 }
19 19
20 CRWWebController* CreateWebController(BrowserState* browser_state) { 20 CRWWebController* CreateWebController(BrowserState* browser_state) {
21 DCHECK(browser_state); 21 DCHECK(browser_state);
22 scoped_ptr<web::WebStateImpl> web_state(new web::WebStateImpl(browser_state)); 22 std::unique_ptr<web::WebStateImpl> web_state(
23 new web::WebStateImpl(browser_state));
23 web_state->GetNavigationManagerImpl().InitializeSession(nil, nil, NO, -1); 24 web_state->GetNavigationManagerImpl().InitializeSession(nil, nil, NO, -1);
24 return CreateWebController(std::move(web_state)); 25 return CreateWebController(std::move(web_state));
25 } 26 }
26 27
27 } // namespace web 28 } // namespace web
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698