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

Unified Diff: chrome/browser/supervised_user/legacy/supervised_user_sync_service.cc

Issue 1878143002: Convert //chrome/browser/supervised_user from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: chrome/browser/supervised_user/legacy/supervised_user_sync_service.cc
diff --git a/chrome/browser/supervised_user/legacy/supervised_user_sync_service.cc b/chrome/browser/supervised_user/legacy/supervised_user_sync_service.cc
index 51c3ba5ac6f19db1aec9c8c361b5d7abe5c611d0..630b163238cf8b8ad0e30ee6f331a0d84e0c7faa 100644
--- a/chrome/browser/supervised_user/legacy/supervised_user_sync_service.cc
+++ b/chrome/browser/supervised_user/legacy/supervised_user_sync_service.cc
@@ -207,13 +207,13 @@ void SupervisedUserSyncService::RemoveObserver(
observers_.RemoveObserver(observer);
}
-scoped_ptr<base::DictionaryValue> SupervisedUserSyncService::CreateDictionary(
- const std::string& name,
- const std::string& master_key,
- const std::string& signature_key,
- const std::string& encryption_key,
- int avatar_index) {
- scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue());
+std::unique_ptr<base::DictionaryValue>
+SupervisedUserSyncService::CreateDictionary(const std::string& name,
+ const std::string& master_key,
+ const std::string& signature_key,
+ const std::string& encryption_key,
+ int avatar_index) {
+ std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue());
result->SetString(kName, name);
result->SetString(kMasterKey, master_key);
result->SetString(kPasswordSignatureKey, signature_key);
@@ -274,7 +274,7 @@ void SupervisedUserSyncService::UpdateSupervisedUserImpl(
bool add_user) {
DictionaryPrefUpdate update(prefs_, prefs::kSupervisedUsers);
base::DictionaryValue* dict = update.Get();
- scoped_ptr<base::DictionaryValue> value = CreateDictionary(
+ std::unique_ptr<base::DictionaryValue> value = CreateDictionary(
name, master_key, signature_key, encryption_key, avatar_index);
DCHECK_EQ(add_user, !dict->HasKey(id));
@@ -407,8 +407,8 @@ void SupervisedUserSyncService::Shutdown() {
SyncMergeResult SupervisedUserSyncService::MergeDataAndStartSyncing(
ModelType type,
const SyncDataList& initial_sync_data,
- scoped_ptr<SyncChangeProcessor> sync_processor,
- scoped_ptr<SyncErrorFactory> error_handler) {
+ std::unique_ptr<SyncChangeProcessor> sync_processor,
+ std::unique_ptr<SyncErrorFactory> error_handler) {
DCHECK_EQ(SUPERVISED_USERS, type);
sync_processor_ = std::move(sync_processor);
error_handler_ = std::move(error_handler);

Powered by Google App Engine
This is Rietveld 408576698