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

Side by Side Diff: chrome/browser/extensions/settings/syncable_settings_storage.cc

Issue 10696087: [Sync] Move ModelType and related classes to 'syncer' namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sort headers, update copyrights Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/extensions/settings/syncable_settings_storage.h" 5 #include "chrome/browser/extensions/settings/syncable_settings_storage.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "chrome/browser/extensions/settings/settings_namespace.h" 8 #include "chrome/browser/extensions/settings/settings_namespace.h"
9 #include "chrome/browser/extensions/settings/settings_sync_processor.h" 9 #include "chrome/browser/extensions/settings/settings_sync_processor.h"
10 #include "chrome/browser/extensions/settings/settings_sync_util.h" 10 #include "chrome/browser/extensions/settings/settings_sync_util.h"
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 233
234 syncer::SyncError SyncableSettingsStorage::ProcessSyncChanges( 234 syncer::SyncError SyncableSettingsStorage::ProcessSyncChanges(
235 const SettingSyncDataList& sync_changes) { 235 const SettingSyncDataList& sync_changes) {
236 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 236 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
237 DCHECK(!sync_changes.empty()) << "No sync changes for " << extension_id_; 237 DCHECK(!sync_changes.empty()) << "No sync changes for " << extension_id_;
238 238
239 if (!sync_processor_.get()) { 239 if (!sync_processor_.get()) {
240 return syncer::SyncError( 240 return syncer::SyncError(
241 FROM_HERE, 241 FROM_HERE,
242 std::string("Sync is inactive for ") + extension_id_, 242 std::string("Sync is inactive for ") + extension_id_,
243 syncable::UNSPECIFIED); 243 syncer::UNSPECIFIED);
244 } 244 }
245 245
246 std::vector<syncer::SyncError> errors; 246 std::vector<syncer::SyncError> errors;
247 ValueStoreChangeList changes; 247 ValueStoreChangeList changes;
248 248
249 for (SettingSyncDataList::const_iterator it = sync_changes.begin(); 249 for (SettingSyncDataList::const_iterator it = sync_changes.begin();
250 it != sync_changes.end(); ++it) { 250 it != sync_changes.end(); ++it) {
251 DCHECK_EQ(extension_id_, it->extension_id()); 251 DCHECK_EQ(extension_id_, it->extension_id());
252 252
253 const std::string& key = it->key(); 253 const std::string& key = it->key();
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 FROM_HERE, 376 FROM_HERE,
377 std::string("Error pushing sync remove to local settings: ") + 377 std::string("Error pushing sync remove to local settings: ") +
378 result->error(), 378 result->error(),
379 sync_processor_->type()); 379 sync_processor_->type());
380 } 380 }
381 changes->push_back(ValueStoreChange(key, old_value, NULL)); 381 changes->push_back(ValueStoreChange(key, old_value, NULL));
382 return syncer::SyncError(); 382 return syncer::SyncError();
383 } 383 }
384 384
385 } // namespace extensions 385 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/extensions/settings/settings_sync_util.cc ('k') | chrome/browser/extensions/test_extension_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698