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

Unified Diff: chrome/browser/sync/syncable/directory_backing_store.cc

Issue 8772074: [Sync] Convert syncable/ directory to ModelEnumSet (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo Created 9 years 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/sync/syncable/directory_backing_store.cc
diff --git a/chrome/browser/sync/syncable/directory_backing_store.cc b/chrome/browser/sync/syncable/directory_backing_store.cc
index 2a080eee46afa85befe63f4836ecd9200179d57d..1f5294dfbc2097dcf78687beecd4ddfedefa9cd9 100644
--- a/chrome/browser/sync/syncable/directory_backing_store.cc
+++ b/chrome/browser/sync/syncable/directory_backing_store.cc
@@ -394,7 +394,7 @@ bool DirectoryBackingStore::SaveChanges(
info.download_progress[i].SerializeToString(&progress_marker);
op.bind_blob(0, model_id.data(), model_id.length());
op.bind_blob(1, progress_marker.data(), progress_marker.length());
- op.bind_bool(2, info.initial_sync_ended[i]);
+ op.bind_bool(2, info.initial_sync_ended.Has(ModelTypeFromInt(i)));
if (!(SQLITE_DONE == op.step() &&
SQLITE_OK == op.reset() &&
@@ -614,7 +614,9 @@ bool DirectoryBackingStore::LoadInfo(Directory::KernelLoadInfo* info) {
if (type != UNSPECIFIED && type != TOP_LEVEL_FOLDER) {
info->kernel_info.download_progress[type].ParseFromArray(
query.column_blob(1), query.column_bytes(1));
- info->kernel_info.initial_sync_ended[type] = query.column_bool(2);
+ if (query.column_bool(2)) {
+ info->kernel_info.initial_sync_ended.Put(type);
+ }
}
}
}
« no previous file with comments | « chrome/browser/sync/sessions/sync_session_unittest.cc ('k') | chrome/browser/sync/syncable/directory_change_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698