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

Side by Side Diff: ios/web/public/test/scoped_testing_web_client.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: rebase? 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/public/test/scoped_testing_web_client.h ('k') | ios/web/public/test/test_web_client.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 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 #include "ios/web/public/test/scoped_testing_web_client.h" 5 #include "ios/web/public/test/scoped_testing_web_client.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ios/web/public/web_client.h" 8 #include "ios/web/public/web_client.h"
9 9
10 namespace web { 10 namespace web {
11 11
12 ScopedTestingWebClient::ScopedTestingWebClient(scoped_ptr<WebClient> web_client) 12 ScopedTestingWebClient::ScopedTestingWebClient(
13 std::unique_ptr<WebClient> web_client)
13 : web_client_(std::move(web_client)), original_web_client_(GetWebClient()) { 14 : web_client_(std::move(web_client)), original_web_client_(GetWebClient()) {
14 SetWebClient(web_client_.get()); 15 SetWebClient(web_client_.get());
15 } 16 }
16 17
17 ScopedTestingWebClient::~ScopedTestingWebClient() { 18 ScopedTestingWebClient::~ScopedTestingWebClient() {
18 DCHECK_EQ(GetWebClient(), web_client_.get()); 19 DCHECK_EQ(GetWebClient(), web_client_.get());
19 SetWebClient(original_web_client_); 20 SetWebClient(original_web_client_);
20 } 21 }
21 22
22 WebClient* ScopedTestingWebClient::Get() { 23 WebClient* ScopedTestingWebClient::Get() {
23 return web_client_.get(); 24 return web_client_.get();
24 } 25 }
25 26
26 } // namespace web 27 } // namespace web
OLDNEW
« no previous file with comments | « ios/web/public/test/scoped_testing_web_client.h ('k') | ios/web/public/test/test_web_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698