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

Unified Diff: chrome/browser/extensions/api/storage/sync_storage_backend.cc

Issue 2466523002: Remove some linked_ptr c/b/extension (Closed)
Patch Set: Created 4 years, 1 month 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: chrome/browser/extensions/api/storage/sync_storage_backend.cc
diff --git a/chrome/browser/extensions/api/storage/sync_storage_backend.cc b/chrome/browser/extensions/api/storage/sync_storage_backend.cc
index 88bf2222a83a41681a6bef77177910eb55a79650..b0dfb3687ffe400527ef981df3b14598ca45ee90 100644
--- a/chrome/browser/extensions/api/storage/sync_storage_backend.cc
+++ b/chrome/browser/extensions/api/storage/sync_storage_backend.cc
@@ -89,10 +89,9 @@ SyncableSettingsStorage* SyncStorageBackend::GetOrCreateStorageWithSyncData(
// It's fine to create the quota enforcer underneath the sync layer, since
// sync will only go ahead if each underlying storage operation succeeds.
- linked_ptr<SyncableSettingsStorage> syncable_storage(
- new SyncableSettingsStorage(
- observers_, extension_id, storage.release(), sync_type_, flare_));
- storage_objs_[extension_id] = syncable_storage;
+ storage_objs_[extension_id] = base::MakeUnique<SyncableSettingsStorage>(
+ observers_, extension_id, storage.release(), sync_type_, flare_);
+ SyncableSettingsStorage* syncable_storage = storage_objs_[extension_id].get();
Devlin 2016/11/02 22:25:33 similar comment here around saving a lookup
limasdf 2016/11/03 15:29:23 Done.
if (sync_processor_.get()) {
syncer::SyncError error = syncable_storage->StartSyncing(
@@ -100,7 +99,7 @@ SyncableSettingsStorage* SyncStorageBackend::GetOrCreateStorageWithSyncData(
if (error.IsSet())
syncable_storage->StopSyncing();
}
- return syncable_storage.get();
+ return syncable_storage;
}
void SyncStorageBackend::DeleteStorage(const std::string& extension_id) {

Powered by Google App Engine
This is Rietveld 408576698