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

Unified Diff: chrome/browser/sync/chrome_sync_client.cc

Issue 1882243004: Convert //chrome/browser/sync from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address feedback 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 | « chrome/browser/sync/chrome_sync_client.h ('k') | chrome/browser/sync/chrome_sync_client_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/chrome_sync_client.cc
diff --git a/chrome/browser/sync/chrome_sync_client.cc b/chrome/browser/sync/chrome_sync_client.cc
index b3c50655531e9943a8cb4bc523eb3ac9bb06c6d3..59cc4cacd29f4caa512704daf219139a9833b54f 100644
--- a/chrome/browser/sync/chrome_sync_client.cc
+++ b/chrome/browser/sync/chrome_sync_client.cc
@@ -9,6 +9,7 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "build/build_config.h"
#include "chrome/browser/autofill/personal_data_manager_factory.h"
#include "chrome/browser/bookmarks/bookmark_model_factory.h"
@@ -161,17 +162,17 @@ class SyncSessionsClientImpl : public sync_sessions::SyncSessionsClient {
return window_delegates_getter_.get();
}
- scoped_ptr<browser_sync::LocalSessionEventRouter> GetLocalSessionEventRouter()
- override {
+ std::unique_ptr<browser_sync::LocalSessionEventRouter>
+ GetLocalSessionEventRouter() override {
syncer::SyncableService::StartSyncFlare flare(
sync_start_util::GetFlareForSyncableService(profile_->GetPath()));
- return make_scoped_ptr(
+ return base::WrapUnique(
new NotificationServiceSessionsRouter(profile_, this, flare));
}
private:
Profile* profile_;
- scoped_ptr<SyncedWindowDelegatesGetter> window_delegates_getter_;
+ std::unique_ptr<SyncedWindowDelegatesGetter> window_delegates_getter_;
DISALLOW_COPY_AND_ASSIGN(SyncSessionsClientImpl);
};
@@ -478,7 +479,7 @@ ChromeSyncClient::GetSyncApiComponentFactory() {
}
void ChromeSyncClient::SetSyncApiComponentFactoryForTesting(
- scoped_ptr<sync_driver::SyncApiComponentFactory> component_factory) {
+ std::unique_ptr<sync_driver::SyncApiComponentFactory> component_factory) {
component_factory_ = std::move(component_factory);
}
« no previous file with comments | « chrome/browser/sync/chrome_sync_client.h ('k') | chrome/browser/sync/chrome_sync_client_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698