Chromium Code Reviews| 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() { |
| + DCHECK_EQ(base::MessageLoop::current(), sync_loop_); |
| + syncer::syncable::Directory* directory = |
|
Nicolas Zea
2014/09/15 22:38:59
What will this do if the SBH isn't initialized yet
maxbogue
2014/09/16 15:34:31
Which part will currently crash? How would the cal
Nicolas Zea
2014/09/18 16:52:17
The SyncManager is only created when DoInitialize
maxbogue
2014/09/22 17:23:25
Fixed this in PSS.
|
| + sync_manager()->GetUserShare()->directory.get(); |
| + if (directory != NULL) { |
| + directory->SaveChanges(); |
| + } |
| +} |
| + |
| void SyncBackendHostCore::SendBufferedProtocolEventsAndEnableForwarding() { |
| DCHECK_EQ(base::MessageLoop::current(), sync_loop_); |
| forward_protocol_events_ = true; |