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

Unified Diff: chrome/browser/sync/glue/sync_backend_host_core.cc

Issue 551843003: Persist Directory to disk when the app is backgrounded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use backend_initialized_ instead of backend_ != NULL. Created 6 years, 3 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
Index: chrome/browser/sync/glue/sync_backend_host_core.cc
diff --git a/chrome/browser/sync/glue/sync_backend_host_core.cc b/chrome/browser/sync/glue/sync_backend_host_core.cc
index 2a78040131e0e7894375a1f11fa40c2e0285eb66..ff5a09962f2c987061b5e67e72e4bc0fd71eb893 100644
--- a/chrome/browser/sync/glue/sync_backend_host_core.cc
+++ b/chrome/browser/sync/glue/sync_backend_host_core.cc
@@ -23,6 +23,7 @@
#include "sync/internal_api/public/sync_context_proxy.h"
#include "sync/internal_api/public/sync_manager.h"
#include "sync/internal_api/public/sync_manager_factory.h"
+#include "sync/syncable/directory.h"
#include "url/gurl.h"
// Helper macros to log with the syncer thread name; useful when there
@@ -662,6 +663,15 @@ void SyncBackendHostCore::DoRetryConfiguration(
retry_callback);
}
+void SyncBackendHostCore::DoFlushDirectory() {
pval...(no longer on Chromium) 2014/09/23 20:11:12 Max/Nicolas: Here is an idea for testing this forc
+ DCHECK_EQ(base::MessageLoop::current(), sync_loop_);
+ syncer::syncable::Directory* directory =
+ sync_manager()->GetUserShare()->directory.get();
+ if (directory != NULL) {
Nicolas Zea 2014/09/22 17:27:46 The PSS conditions should protect directory from b
+ directory->SaveChanges();
+ }
+}
+
void SyncBackendHostCore::SendBufferedProtocolEventsAndEnableForwarding() {
DCHECK_EQ(base::MessageLoop::current(), sync_loop_);
forward_protocol_events_ = true;

Powered by Google App Engine
This is Rietveld 408576698