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

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

Issue 196073002: Move ScopedFILE to base namespace and scoped_file.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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: 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 a1be0587d31aafe6b5bea12e08d8a71c727f392f..95f7333f768af7a25c18622f5962c27628828ea6 100644
--- a/chrome/browser/safe_browsing/safe_browsing_store_file.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_store_file.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/safe_browsing/safe_browsing_store_file.h"
+#include "base/file_util.h"
+#include "base/files/scoped_file.h"
#include "base/md5.h"
#include "base/metrics/histogram.h"
@@ -292,7 +294,7 @@ bool SafeBrowsingStoreFile::WriteAddPrefix(int32 chunk_id, SBPrefix prefix) {
bool SafeBrowsingStoreFile::GetAddPrefixes(SBAddPrefixes* add_prefixes) {
add_prefixes->clear();
- file_util::ScopedFILE file(base::OpenFile(filename_, "rb"));
+ base::ScopedFILE file(base::OpenFile(filename_, "rb"));
if (file.get() == NULL) return false;
FileHeader header;
@@ -314,7 +316,7 @@ bool SafeBrowsingStoreFile::GetAddFullHashes(
std::vector<SBAddFullHash>* add_full_hashes) {
add_full_hashes->clear();
- file_util::ScopedFILE file(base::OpenFile(filename_, "rb"));
+ base::ScopedFILE file(base::OpenFile(filename_, "rb"));
if (file.get() == NULL) return false;
FileHeader header;
@@ -397,11 +399,11 @@ bool SafeBrowsingStoreFile::BeginUpdate() {
corruption_seen_ = false;
const base::FilePath new_filename = TemporaryFileForFilename(filename_);
- file_util::ScopedFILE new_file(base::OpenFile(new_filename, "wb+"));
+ base::ScopedFILE new_file(base::OpenFile(new_filename, "wb+"));
if (new_file.get() == NULL)
return false;
- file_util::ScopedFILE file(base::OpenFile(filename_, "rb"));
+ base::ScopedFILE file(base::OpenFile(filename_, "rb"));
empty_ = (file.get() == NULL);
if (empty_) {
// If the file exists but cannot be opened, try to delete it (not

Powered by Google App Engine
This is Rietveld 408576698