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

Unified Diff: chrome/browser/safe_browsing/safe_browsing_store_file.cc

Issue 381243002: [safe browsing] Delete temporary files on cancelled update. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/safe_browsing/safe_browsing_store_file.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_store_file.cc b/chrome/browser/safe_browsing/safe_browsing_store_file.cc
index 01a5dc73395ced463b8b3be37e2c7e44a2d3c32c..b4ce3867555cd9bc49e2d18c45782d06b3de1661 100644
--- a/chrome/browser/safe_browsing/safe_browsing_store_file.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_store_file.cc
@@ -1182,7 +1182,13 @@ bool SafeBrowsingStoreFile::FinishUpdate(
}
bool SafeBrowsingStoreFile::CancelUpdate() {
- return Close();
+ bool ret = Close();
+
+ // Delete stale staging file.
+ const base::FilePath new_filename = TemporaryFileForFilename(filename_);
+ base::DeleteFile(new_filename, false);
+
+ return ret;
}
void SafeBrowsingStoreFile::SetAddChunk(int32 chunk_id) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698