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

Unified Diff: components/sync_driver/sync_prefs.cc

Issue 1907683003: Convert //components/sync_driver from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Build fix, 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 | « components/sync_driver/sync_prefs.h ('k') | components/sync_driver/sync_service.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync_driver/sync_prefs.cc
diff --git a/components/sync_driver/sync_prefs.cc b/components/sync_driver/sync_prefs.cc
index 185a122fe3259f82a09efaaf2d59fab61401f209..ffe0b280c8e0ef73dbc7b864808adc269659e26c 100644
--- a/components/sync_driver/sync_prefs.cc
+++ b/components/sync_driver/sync_prefs.cc
@@ -498,7 +498,7 @@ void SyncPrefs::GetInvalidationVersions(
void SyncPrefs::UpdateInvalidationVersions(
const std::map<syncer::ModelType, int64_t>& invalidation_versions) {
- scoped_ptr<base::DictionaryValue> invalidation_dictionary(
+ std::unique_ptr<base::DictionaryValue> invalidation_dictionary(
new base::DictionaryValue());
for (const auto& map_iter : invalidation_versions) {
std::string version_str = base::Int64ToString(map_iter.second);
@@ -536,18 +536,18 @@ void SyncPrefs::SetSavedNigoriStateForPassphraseEncryptionTransition(
encoded);
}
-scoped_ptr<syncer::SyncEncryptionHandler::NigoriState>
+std::unique_ptr<syncer::SyncEncryptionHandler::NigoriState>
SyncPrefs::GetSavedNigoriStateForPassphraseEncryptionTransition() const {
const std::string encoded =
pref_service_->GetString(prefs::kSyncNigoriStateForPassphraseTransition);
std::string decoded;
if (!base::Base64Decode(encoded, &decoded))
- return scoped_ptr<syncer::SyncEncryptionHandler::NigoriState>();
+ return std::unique_ptr<syncer::SyncEncryptionHandler::NigoriState>();
- scoped_ptr<syncer::SyncEncryptionHandler::NigoriState> result(
+ std::unique_ptr<syncer::SyncEncryptionHandler::NigoriState> result(
new syncer::SyncEncryptionHandler::NigoriState());
if (!result->nigori_specifics.ParseFromString(decoded))
- return scoped_ptr<syncer::SyncEncryptionHandler::NigoriState>();
+ return std::unique_ptr<syncer::SyncEncryptionHandler::NigoriState>();
return result;
}
« no previous file with comments | « components/sync_driver/sync_prefs.h ('k') | components/sync_driver/sync_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698