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

Unified Diff: components/safe_browsing_db/v4_database.cc

Issue 2066083002: SafeBrowising: Read and write V4Store from/to disk (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@01_UpdateDbAndStores
Patch Set: CR feedback: shess@ latest comments Created 4 years, 6 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/safe_browsing_db/v4_database.cc
diff --git a/components/safe_browsing_db/v4_database.cc b/components/safe_browsing_db/v4_database.cc
index 0b5acf79d967421995c06e4cbe0092a5a334c1ed..5c80fecb0d68cbb36a10250dcfa7bce82cc0d219 100644
--- a/components/safe_browsing_db/v4_database.cc
+++ b/components/safe_browsing_db/v4_database.cc
@@ -6,6 +6,7 @@
#include "base/callback.h"
#include "base/debug/leak_annotations.h"
+#include "base/files/file_util.h"
#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "components/safe_browsing_db/v4_database.h"
@@ -54,6 +55,10 @@ void V4Database::CreateOnTaskRunner(
ANNOTATE_LEAKING_OBJECT_PTR(factory_);
}
+ if (!base::CreateDirectory(base_path)) {
+ NOTREACHED();
+ }
+
std::unique_ptr<StoreMap> store_map = base::MakeUnique<StoreMap>();
for (const auto& store_info : store_file_name_map) {
const UpdateListIdentifier& update_list_identifier = store_info.first;

Powered by Google App Engine
This is Rietveld 408576698