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

Unified Diff: components/feedback/feedback_data_unittest.cc

Issue 1918083002: Convert //components/[f-n]* 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/feedback/feedback_data.cc ('k') | components/feedback/feedback_uploader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/feedback/feedback_data_unittest.cc
diff --git a/components/feedback/feedback_data_unittest.cc b/components/feedback/feedback_data_unittest.cc
index 53efa431f0d4f43d749bc6d80991271947e53f7c..5530589d29cfdcfe3529b3409ce5f610e9ec936e 100644
--- a/components/feedback/feedback_data_unittest.cc
+++ b/components/feedback/feedback_data_unittest.cc
@@ -4,10 +4,11 @@
#include "components/feedback/feedback_data.h"
+#include <memory>
#include <set>
#include <utility>
-#include "base/memory/scoped_ptr.h"
+#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "components/feedback/feedback_uploader.h"
@@ -40,15 +41,15 @@ class MockUploader : public feedback::FeedbackUploader, public KeyedService {
MOCK_METHOD1(DispatchReport, void(const std::string&));
};
-scoped_ptr<KeyedService> CreateFeedbackUploaderService(
+std::unique_ptr<KeyedService> CreateFeedbackUploaderService(
content::BrowserContext* context) {
- scoped_ptr<MockUploader> uploader(new MockUploader(context));
+ std::unique_ptr<MockUploader> uploader(new MockUploader(context));
EXPECT_CALL(*uploader, DispatchReport(testing::_)).Times(1);
return std::move(uploader);
}
-scoped_ptr<std::string> MakeScoped(const char* str) {
- return scoped_ptr<std::string>(new std::string(str));
+std::unique_ptr<std::string> MakeScoped(const char* str) {
+ return base::WrapUnique(new std::string(str));
}
} // namespace
@@ -93,9 +94,9 @@ class FeedbackDataTest : public testing::Test {
}
base::Closure quit_closure_;
- scoped_ptr<base::RunLoop> run_loop_;
- scoped_ptr<content::TestBrowserContext> context_;
- scoped_ptr<PrefService> prefs_;
+ std::unique_ptr<base::RunLoop> run_loop_;
+ std::unique_ptr<content::TestBrowserContext> context_;
+ std::unique_ptr<PrefService> prefs_;
scoped_refptr<FeedbackData> data_;
base::MessageLoop message_loop_;
content::TestBrowserThread ui_thread_;
« no previous file with comments | « components/feedback/feedback_data.cc ('k') | components/feedback/feedback_uploader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698