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

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

Issue 304093002: [SyncFS] Check SyncEngine's availability (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | 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 9dc0c8181bcdcc349ff1e47a07d705178251241a..b8d9c17d8d39d903dafcc51b577edd036da883b1 100644
--- a/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
+++ b/chrome/browser/sync_file_system/drive_backend/sync_engine.cc
@@ -71,7 +71,8 @@ class SyncEngine::WorkerObserver : public SyncWorker::Observer {
virtual void OnPendingFileListUpdated(int item_count) OVERRIDE {
if (ui_task_runner_->RunsTasksOnCurrentThread()) {
- sync_engine_->OnPendingFileListUpdated(item_count);
+ if (sync_engine_)
+ sync_engine_->OnPendingFileListUpdated(item_count);
return;
}
@@ -87,8 +88,9 @@ class SyncEngine::WorkerObserver : public SyncWorker::Observer {
SyncAction sync_action,
SyncDirection direction) OVERRIDE {
if (ui_task_runner_->RunsTasksOnCurrentThread()) {
- sync_engine_->OnFileStatusChanged(
- url, file_status, sync_action, direction);
+ if (sync_engine_)
+ sync_engine_->OnFileStatusChanged(
+ url, file_status, sync_action, direction);
return;
}
@@ -102,7 +104,8 @@ class SyncEngine::WorkerObserver : public SyncWorker::Observer {
virtual void UpdateServiceState(RemoteServiceState state,
const std::string& description) OVERRIDE {
if (ui_task_runner_->RunsTasksOnCurrentThread()) {
- sync_engine_->UpdateServiceState(state, description);
+ if (sync_engine_)
+ sync_engine_->UpdateServiceState(state, description);
return;
}
« 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