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

Unified Diff: chrome/browser/sync_file_system/drive_backend/drive_backend_util.cc

Issue 134863003: [SyncFS] Refactor MetadataDatabase on dirty flag handling and sync-root creation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: testfix Created 6 years, 10 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 | « no previous file | chrome/browser/sync_file_system/drive_backend/metadata_database.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync_file_system/drive_backend/drive_backend_util.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/drive_backend_util.cc b/chrome/browser/sync_file_system/drive_backend/drive_backend_util.cc
index e879f7b05b1a10a4308cae099e5be747f8392538..bd072bd475d2b6252f30d6fa067e0e2dac8ad565 100644
--- a/chrome/browser/sync_file_system/drive_backend/drive_backend_util.cc
+++ b/chrome/browser/sync_file_system/drive_backend/drive_backend_util.cc
@@ -30,6 +30,9 @@ void PutServiceMetadataToBatch(const ServiceMetadata& service_metadata,
}
void PutFileToBatch(const FileMetadata& file, leveldb::WriteBatch* batch) {
+ if (!batch)
+ return;
+
std::string value;
bool success = file.SerializeToString(&value);
DCHECK(success);
@@ -37,6 +40,9 @@ void PutFileToBatch(const FileMetadata& file, leveldb::WriteBatch* batch) {
}
void PutTrackerToBatch(const FileTracker& tracker, leveldb::WriteBatch* batch) {
+ if (!batch)
+ return;
+
std::string value;
bool success = tracker.SerializeToString(&value);
DCHECK(success);
« no previous file with comments | « no previous file | chrome/browser/sync_file_system/drive_backend/metadata_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698