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

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

Issue 16915006: Convert most of extensions and some other random stuff to using the base namespace for Values. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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/extensions/api/storage/syncable_settings_storage.cc
diff --git a/chrome/browser/extensions/api/storage/syncable_settings_storage.cc b/chrome/browser/extensions/api/storage/syncable_settings_storage.cc
index 221ebeb3edf9dabeb55d649f5f5f22bac398e8bc..5bfc039926768e35acd5e261fab0e07dc8d23253 100644
--- a/chrome/browser/extensions/api/storage/syncable_settings_storage.cc
+++ b/chrome/browser/extensions/api/storage/syncable_settings_storage.cc
@@ -75,7 +75,7 @@ ValueStore::WriteResult SyncableSettingsStorage::Set(
}
ValueStore::WriteResult SyncableSettingsStorage::Set(
- WriteOptions options, const DictionaryValue& values) {
+ WriteOptions options, const base::DictionaryValue& values) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
WriteResult result = delegate_->Set(options, values);
if (result->HasError()) {
@@ -129,7 +129,7 @@ void SyncableSettingsStorage::SyncResultIfEnabled(
// Sync-related methods.
syncer::SyncError SyncableSettingsStorage::StartSyncing(
- const DictionaryValue& sync_state,
+ const base::DictionaryValue& sync_state,
scoped_ptr<SettingsSyncProcessor> sync_processor) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
DCHECK(!sync_processor_.get());
@@ -145,7 +145,7 @@ syncer::SyncError SyncableSettingsStorage::StartSyncing(
sync_processor_->type());
}
- const DictionaryValue& settings = *maybe_settings->settings().get();
+ const base::DictionaryValue& settings = *maybe_settings->settings().get();
if (sync_state.empty())
return SendLocalSettingsToSync(settings);
else
@@ -153,11 +153,11 @@ syncer::SyncError SyncableSettingsStorage::StartSyncing(
}
syncer::SyncError SyncableSettingsStorage::SendLocalSettingsToSync(
- const DictionaryValue& settings) {
+ const base::DictionaryValue& settings) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
ValueStoreChangeList changes;
- for (DictionaryValue::Iterator i(settings); !i.IsAtEnd(); i.Advance()) {
+ for (base::DictionaryValue::Iterator i(settings); !i.IsAtEnd(); i.Advance()) {
changes.push_back(ValueStoreChange(i.key(), NULL, i.value().DeepCopy()));
}
@@ -172,14 +172,15 @@ syncer::SyncError SyncableSettingsStorage::SendLocalSettingsToSync(
}
syncer::SyncError SyncableSettingsStorage::OverwriteLocalSettingsWithSync(
- const DictionaryValue& sync_state, const DictionaryValue& settings) {
+ const base::DictionaryValue& sync_state,
+ const base::DictionaryValue& settings) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
// Treat this as a list of changes to sync and use ProcessSyncChanges.
// This gives notifications etc for free.
- scoped_ptr<DictionaryValue> new_sync_state(sync_state.DeepCopy());
+ scoped_ptr<base::DictionaryValue> new_sync_state(sync_state.DeepCopy());
SettingSyncDataList changes;
- for (DictionaryValue::Iterator it(settings); !it.IsAtEnd(); it.Advance()) {
+ for (base::DictionaryValue::Iterator it(settings); !it.IsAtEnd(); it.Advance()) {
Value* orphaned_sync_value = NULL;
if (new_sync_state->RemoveWithoutPathExpansion(
it.key(), &orphaned_sync_value)) {
@@ -202,13 +203,13 @@ syncer::SyncError SyncableSettingsStorage::OverwriteLocalSettingsWithSync(
syncer::SyncChange::ACTION_DELETE,
extension_id_,
it.key(),
- scoped_ptr<Value>(new DictionaryValue())));
+ scoped_ptr<Value>(new base::DictionaryValue())));
}
}
// Add all new settings to local settings.
while (!new_sync_state->empty()) {
- DictionaryValue::Iterator first_entry(*new_sync_state);
+ base::DictionaryValue::Iterator first_entry(*new_sync_state);
std::string key = first_entry.key();
Value* value = NULL;
CHECK(new_sync_state->RemoveWithoutPathExpansion(key, &value));

Powered by Google App Engine
This is Rietveld 408576698