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

Side by Side Diff: ios/web/public/test/scoped_testing_web_client.h

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
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 #ifndef IOS_WEB_PUBLIC_TEST_SCOPED_TESTING_WEB_CLIENT_H_ 5 #ifndef IOS_WEB_PUBLIC_TEST_SCOPED_TESTING_WEB_CLIENT_H_
6 #define IOS_WEB_PUBLIC_TEST_SCOPED_TESTING_WEB_CLIENT_H_ 6 #define IOS_WEB_PUBLIC_TEST_SCOPED_TESTING_WEB_CLIENT_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 11
11 namespace web { 12 namespace web {
12 13
13 class WebClient; 14 class WebClient;
14 15
15 // Helper class to register a WebClient during unit testing. 16 // Helper class to register a WebClient during unit testing.
16 class ScopedTestingWebClient { 17 class ScopedTestingWebClient {
17 public: 18 public:
18 explicit ScopedTestingWebClient(scoped_ptr<WebClient> web_client); 19 explicit ScopedTestingWebClient(std::unique_ptr<WebClient> web_client);
19 ~ScopedTestingWebClient(); 20 ~ScopedTestingWebClient();
20 21
21 WebClient* Get(); 22 WebClient* Get();
22 23
23 private: 24 private:
24 scoped_ptr<WebClient> web_client_; 25 std::unique_ptr<WebClient> web_client_;
25 WebClient* original_web_client_; 26 WebClient* original_web_client_;
26 }; 27 };
27 28
28 } // namespace web 29 } // namespace web
29 30
30 #endif // IOS_WEB_PUBLIC_TEST_SCOPED_TESTING_WEB_CLIENT_H_ 31 #endif // IOS_WEB_PUBLIC_TEST_SCOPED_TESTING_WEB_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698