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

Side by Side Diff: chrome/browser/sync/chrome_sync_client.cc

Issue 2334613003: Re-write many calls to WrapUnique() with MakeUnique() (Closed)
Patch Set: Changes from review by sky 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 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 "chrome/browser/sync/chrome_sync_client.h" 5 #include "chrome/browser/sync/chrome_sync_client.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 } 162 }
163 163
164 SyncedWindowDelegatesGetter* GetSyncedWindowDelegatesGetter() override { 164 SyncedWindowDelegatesGetter* GetSyncedWindowDelegatesGetter() override {
165 return window_delegates_getter_.get(); 165 return window_delegates_getter_.get();
166 } 166 }
167 167
168 std::unique_ptr<browser_sync::LocalSessionEventRouter> 168 std::unique_ptr<browser_sync::LocalSessionEventRouter>
169 GetLocalSessionEventRouter() override { 169 GetLocalSessionEventRouter() override {
170 syncer::SyncableService::StartSyncFlare flare( 170 syncer::SyncableService::StartSyncFlare flare(
171 sync_start_util::GetFlareForSyncableService(profile_->GetPath())); 171 sync_start_util::GetFlareForSyncableService(profile_->GetPath()));
172 return base::WrapUnique( 172 return base::MakeUnique<NotificationServiceSessionsRouter>(profile_, this,
173 new NotificationServiceSessionsRouter(profile_, this, flare)); 173 flare);
174 } 174 }
175 175
176 private: 176 private:
177 Profile* profile_; 177 Profile* profile_;
178 std::unique_ptr<SyncedWindowDelegatesGetter> window_delegates_getter_; 178 std::unique_ptr<SyncedWindowDelegatesGetter> window_delegates_getter_;
179 179
180 DISALLOW_COPY_AND_ASSIGN(SyncSessionsClientImpl); 180 DISALLOW_COPY_AND_ASSIGN(SyncSessionsClientImpl);
181 }; 181 };
182 182
183 ChromeSyncClient::ChromeSyncClient(Profile* profile) 183 ChromeSyncClient::ChromeSyncClient(Profile* profile)
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 sync_service->RegisterDataTypeController( 627 sync_service->RegisterDataTypeController(
628 base::MakeUnique<SupervisedUserSyncDataTypeController>( 628 base::MakeUnique<SupervisedUserSyncDataTypeController>(
629 syncer::SUPERVISED_USER_SETTINGS, error_callback, this, profile_)); 629 syncer::SUPERVISED_USER_SETTINGS, error_callback, this, profile_));
630 sync_service->RegisterDataTypeController( 630 sync_service->RegisterDataTypeController(
631 base::MakeUnique<SupervisedUserSyncDataTypeController>( 631 base::MakeUnique<SupervisedUserSyncDataTypeController>(
632 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_)); 632 syncer::SUPERVISED_USER_WHITELISTS, error_callback, this, profile_));
633 #endif 633 #endif
634 } 634 }
635 635
636 } // namespace browser_sync 636 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/supervised_user/supervised_user_url_filter.cc ('k') | chrome/browser/sync/profile_sync_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698