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

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: Ifdefs for Windows only. Created 4 years, 2 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: 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..4e87763b591f7949e753af1664d14acd9acc1cfb 100644
--- a/components/sync/engine_impl/loopback_server/loopback_server.cc
+++ b/components/sync/engine_impl/loopback_server/loopback_server.cc
@@ -523,6 +523,7 @@ bool LoopbackServer::SaveStateToFile(const base::FilePath& filename) const {
SerializeState(&proto);
std::string serialized = proto.SerializeAsString();
+ CHECK(base::CreateDirectory(filename.DirName()));
pavely 2016/10/27 23:53:39 Failure to create directory is the same as failure
pastarmovj 2016/11/02 13:39:25 Agree and it should not crash for this reason imho
int result = base::WriteFile(filename, serialized.data(), serialized.size());
return result == static_cast<int>(serialized.size());
}

Powered by Google App Engine
This is Rietveld 408576698