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) { |