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

Side by Side Diff: sync/syncable/in_memory_directory_backing_store.cc

Issue 10821121: sync: Attempt to recover from directory corruption (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix other win compile warning Created 8 years, 4 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 "sync/syncable/in_memory_directory_backing_store.h" 5 #include "sync/syncable/in_memory_directory_backing_store.h"
6 6
7 namespace syncer { 7 namespace syncer {
8 namespace syncable { 8 namespace syncable {
9 9
10 InMemoryDirectoryBackingStore::InMemoryDirectoryBackingStore( 10 InMemoryDirectoryBackingStore::InMemoryDirectoryBackingStore(
(...skipping 10 matching lines...) Expand all
21 21
22 if (!InitializeTables()) 22 if (!InitializeTables())
23 return FAILED_OPEN_DATABASE; 23 return FAILED_OPEN_DATABASE;
24 24
25 if (!DropDeletedEntries()) 25 if (!DropDeletedEntries())
26 return FAILED_DATABASE_CORRUPT; 26 return FAILED_DATABASE_CORRUPT;
27 if (!LoadEntries(entry_bucket)) 27 if (!LoadEntries(entry_bucket))
28 return FAILED_DATABASE_CORRUPT; 28 return FAILED_DATABASE_CORRUPT;
29 if (!LoadInfo(kernel_load_info)) 29 if (!LoadInfo(kernel_load_info))
30 return FAILED_DATABASE_CORRUPT; 30 return FAILED_DATABASE_CORRUPT;
31 if (!VerifyReferenceIntegrity(*entry_bucket))
32 return FAILED_DATABASE_CORRUPT;
31 33
32 return OPENED; 34 return OPENED;
33 } 35 }
34 36
35 } // namespace syncable 37 } // namespace syncable
36 } // namespace syncer 38 } // namespace syncer
OLDNEW
« no previous file with comments | « sync/syncable/directory_backing_store_unittest.cc ('k') | sync/syncable/on_disk_directory_backing_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698