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

Side by Side Diff: components/invalidation/impl/ticl_invalidation_service_unittest.cc

Issue 2257793002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 3 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/invalidation/impl/ticl_invalidation_service.h" 5 #include "components/invalidation/impl/ticl_invalidation_service.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 61
62 void CreateInvalidationService() { 62 void CreateInvalidationService() {
63 CreateUninitializedInvalidationService(); 63 CreateUninitializedInvalidationService();
64 InitializeInvalidationService(); 64 InitializeInvalidationService();
65 } 65 }
66 66
67 void CreateUninitializedInvalidationService() { 67 void CreateUninitializedInvalidationService() {
68 gcm_driver_.reset(new gcm::FakeGCMDriver()); 68 gcm_driver_.reset(new gcm::FakeGCMDriver());
69 invalidation_service_.reset(new TiclInvalidationService( 69 invalidation_service_.reset(new TiclInvalidationService(
70 "TestUserAgent", 70 "TestUserAgent",
71 base::WrapUnique(new FakeIdentityProvider(&token_service_)), 71 base::MakeUnique<FakeIdentityProvider>(&token_service_),
72 std::unique_ptr<TiclSettingsProvider>(new FakeTiclSettingsProvider), 72 std::unique_ptr<TiclSettingsProvider>(new FakeTiclSettingsProvider),
73 gcm_driver_.get(), NULL)); 73 gcm_driver_.get(), NULL));
74 } 74 }
75 75
76 void InitializeInvalidationService() { 76 void InitializeInvalidationService() {
77 fake_invalidator_ = new syncer::FakeInvalidator(); 77 fake_invalidator_ = new syncer::FakeInvalidator();
78 invalidation_service_->InitForTest( 78 invalidation_service_->InitForTest(
79 base::WrapUnique(new syncer::FakeInvalidationStateTracker), 79 base::WrapUnique(new syncer::FakeInvalidationStateTracker),
80 fake_invalidator_); 80 fake_invalidator_);
81 } 81 }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 143
144 delegate->InitializeInvalidationService(); 144 delegate->InitializeInvalidationService();
145 145
146 invalidator->RequestDetailedStatus( 146 invalidator->RequestDetailedStatus(
147 base::Bind(&internal::FakeCallbackContainer::FakeCallback, 147 base::Bind(&internal::FakeCallbackContainer::FakeCallback,
148 fake_container.weak_ptr_factory_.GetWeakPtr())); 148 fake_container.weak_ptr_factory_.GetWeakPtr()));
149 EXPECT_TRUE(fake_container.called_); 149 EXPECT_TRUE(fake_container.called_);
150 } 150 }
151 151
152 } // namespace invalidation 152 } // namespace invalidation
OLDNEW
« no previous file with comments | « components/invalidation/impl/sync_system_resources.cc ('k') | components/metrics/file_metrics_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698