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

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

Issue 98473004: Syncfs-internal: Return empty value if metadata_database is not yet initialized (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync_file_system/drive_backend/sync_engine.cc
diff --git a/chrome/browser/sync_file_system/drive_backend/sync_engine.cc b/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
index 74c6138783a5ef20cedb638406fec0421c3bbc27..d6e2a6b12eeaec0a4ad4176f5b6de4e6591b0672 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
+++ b/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
@@ -217,7 +217,7 @@ RemoteServiceState SyncEngine::GetCurrentState() const {
void SyncEngine::GetOriginStatusMap(OriginStatusMap* status_map) {
DCHECK(status_map);
- if (!extension_service_)
+ if (!extension_service_ || !metadata_database_)
return;
std::vector<std::string> app_ids;
@@ -234,6 +234,8 @@ void SyncEngine::GetOriginStatusMap(OriginStatusMap* status_map) {
}
scoped_ptr<base::ListValue> SyncEngine::DumpFiles(const GURL& origin) {
+ if (!metadata_database_)
+ return scoped_ptr<base::ListValue>();
return metadata_database_->DumpFiles(origin.host());
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698