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

Unified Diff: components/sync/engine_impl/attachments/attachment_downloader_impl_unittest.cc

Issue 2422253002: [Sync] Rewriting ".reset(new" pattern to use "= base::MakeUnique" instead. (Closed)
Patch Set: Fixing compile. Created 4 years, 2 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
Index: components/sync/engine_impl/attachments/attachment_downloader_impl_unittest.cc
diff --git a/components/sync/engine_impl/attachments/attachment_downloader_impl_unittest.cc b/components/sync/engine_impl/attachments/attachment_downloader_impl_unittest.cc
index 87793951aaa190a3f7631bdffece8ce8d9b60c0c..321ed40ecf89b3df67a9f5565d21f0b0f27092f1 100644
--- a/components/sync/engine_impl/attachments/attachment_downloader_impl_unittest.cc
+++ b/components/sync/engine_impl/attachments/attachment_downloader_impl_unittest.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/location.h"
+#include "base/memory/ptr_util.h"
#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
@@ -206,7 +207,7 @@ void AttachmentDownloaderImplTest::SetUp() {
url_request_context_getter_ =
new net::TestURLRequestContextGetter(message_loop_.task_runner());
url_fetcher_factory_.set_remove_fetcher_on_delete(true);
- token_service_.reset(new MockOAuth2TokenService());
+ token_service_ = base::MakeUnique<MockOAuth2TokenService>();
token_service_->AddAccount(kAccountId);
scoped_refptr<OAuth2TokenServiceRequest::TokenServiceProvider>
token_service_provider(new TokenServiceProvider(token_service_.get()));

Powered by Google App Engine
This is Rietveld 408576698