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

Unified Diff: components/sync/engine_impl/loopback_server/loopback_server.cc

Issue 2442453002: [Sync] Adds a new switch for enabling the new local server backend. (Closed)
Patch Set: Fix InitArgs contructor. Created 4 years, 1 month 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 | « components/sync/engine/sync_manager.cc ('k') | components/sync/engine_impl/sync_manager_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/sync/engine_impl/loopback_server/loopback_server.cc
diff --git a/components/sync/engine_impl/loopback_server/loopback_server.cc b/components/sync/engine_impl/loopback_server/loopback_server.cc
index ef701df388764d1e214a5a27655260a578f109eb..88eb7ca095bbca0a13f7be92539401af5f6ad69f 100644
--- a/components/sync/engine_impl/loopback_server/loopback_server.cc
+++ b/components/sync/engine_impl/loopback_server/loopback_server.cc
@@ -523,6 +523,10 @@ bool LoopbackServer::SaveStateToFile(const base::FilePath& filename) const {
SerializeState(&proto);
std::string serialized = proto.SerializeAsString();
+ if (!base::CreateDirectory(filename.DirName())) {
+ LOG(ERROR) << "Loopback sync could not create the storage directory.";
+ return false;
+ }
int result = base::WriteFile(filename, serialized.data(), serialized.size());
return result == static_cast<int>(serialized.size());
}
« no previous file with comments | « components/sync/engine/sync_manager.cc ('k') | components/sync/engine_impl/sync_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698