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

Side by Side Diff: ios/chrome/browser/sync/ios_chrome_sync_client.mm

Issue 2256193002: Re-write many calls to WrapUnique() with MakeUnique() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 "ios/chrome/browser/sync/ios_chrome_sync_client.h" 5 #include "ios/chrome/browser/sync/ios_chrome_sync_client.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 browser_sync::SyncedWindowDelegatesGetter* GetSyncedWindowDelegatesGetter() 109 browser_sync::SyncedWindowDelegatesGetter* GetSyncedWindowDelegatesGetter()
110 override { 110 override {
111 return window_delegates_getter_.get(); 111 return window_delegates_getter_.get();
112 } 112 }
113 113
114 std::unique_ptr<browser_sync::LocalSessionEventRouter> 114 std::unique_ptr<browser_sync::LocalSessionEventRouter>
115 GetLocalSessionEventRouter() override { 115 GetLocalSessionEventRouter() override {
116 syncer::SyncableService::StartSyncFlare flare( 116 syncer::SyncableService::StartSyncFlare flare(
117 ios::sync_start_util::GetFlareForSyncableService( 117 ios::sync_start_util::GetFlareForSyncableService(
118 browser_state_->GetStatePath())); 118 browser_state_->GetStatePath()));
119 return base::WrapUnique( 119 return base::MakeUnique<IOSChromeLocalSessionEventRouter>(browser_state_,
120 new IOSChromeLocalSessionEventRouter(browser_state_, this, flare)); 120 this, flare);
121 } 121 }
122 122
123 private: 123 private:
124 ios::ChromeBrowserState* const browser_state_; 124 ios::ChromeBrowserState* const browser_state_;
125 const std::unique_ptr<browser_sync::SyncedWindowDelegatesGetter> 125 const std::unique_ptr<browser_sync::SyncedWindowDelegatesGetter>
126 window_delegates_getter_; 126 window_delegates_getter_;
127 127
128 DISALLOW_COPY_AND_ASSIGN(SyncSessionsClientImpl); 128 DISALLOW_COPY_AND_ASSIGN(SyncSessionsClientImpl);
129 }; 129 };
130 130
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 IOSChromeProfileSyncServiceFactory::GetForBrowserState(browser_state); 400 IOSChromeProfileSyncServiceFactory::GetForBrowserState(browser_state);
401 if (profile_sync_service != nullptr) { 401 if (profile_sync_service != nullptr) {
402 const sync_driver::DeviceInfoTracker* tracker = 402 const sync_driver::DeviceInfoTracker* tracker =
403 profile_sync_service->GetDeviceInfoTracker(); 403 profile_sync_service->GetDeviceInfoTracker();
404 if (tracker != nullptr) { 404 if (tracker != nullptr) {
405 trackers->push_back(tracker); 405 trackers->push_back(tracker);
406 } 406 }
407 } 407 }
408 } 408 }
409 } 409 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/sync/ios_chrome_profile_sync_test_util.cc ('k') | ios/chrome/browser/sync/sync_setup_service_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698