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

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

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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
Index: chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc
diff --git a/chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc
index 89eec6f4b7adb976f1e58b49444c5333a53a9ca8..347073607c76a0ff9889a555be14cdc763adb19c 100644
--- a/chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_store_file_unittest.cc
@@ -57,24 +57,24 @@ TEST_F(SafeBrowsingStoreFileTest, DeleteTemp) {
const base::FilePath temp_file =
SafeBrowsingStoreFile::TemporaryFileForFilename(filename_);
- EXPECT_FALSE(file_util::PathExists(filename_));
- EXPECT_FALSE(file_util::PathExists(temp_file));
+ EXPECT_FALSE(base::PathExists(filename_));
+ EXPECT_FALSE(base::PathExists(temp_file));
// Starting a transaction creates a temporary file.
EXPECT_TRUE(store_->BeginUpdate());
- EXPECT_TRUE(file_util::PathExists(temp_file));
+ EXPECT_TRUE(base::PathExists(temp_file));
// Pull the rug out from under the existing store, simulating a
// crash.
store_.reset(new SafeBrowsingStoreFile());
store_->Init(filename_, base::Closure());
- EXPECT_FALSE(file_util::PathExists(filename_));
- EXPECT_TRUE(file_util::PathExists(temp_file));
+ EXPECT_FALSE(base::PathExists(filename_));
+ EXPECT_TRUE(base::PathExists(temp_file));
// Make sure the temporary file is deleted.
EXPECT_TRUE(store_->Delete());
- EXPECT_FALSE(file_util::PathExists(filename_));
- EXPECT_FALSE(file_util::PathExists(temp_file));
+ EXPECT_FALSE(base::PathExists(filename_));
+ EXPECT_FALSE(base::PathExists(temp_file));
}
// Test basic corruption-handling.
@@ -133,7 +133,7 @@ TEST_F(SafeBrowsingStoreFileTest, DetectsCorruption) {
TEST_F(SafeBrowsingStoreFileTest, CheckValidity) {
// Empty store is valid.
- EXPECT_FALSE(file_util::PathExists(filename_));
+ EXPECT_FALSE(base::PathExists(filename_));
ASSERT_TRUE(store_->BeginUpdate());
EXPECT_FALSE(corruption_detected_);
EXPECT_TRUE(store_->CheckValidity());
@@ -141,9 +141,9 @@ TEST_F(SafeBrowsingStoreFileTest, CheckValidity) {
EXPECT_TRUE(store_->CancelUpdate());
// A store with some data is valid.
- EXPECT_FALSE(file_util::PathExists(filename_));
+ EXPECT_FALSE(base::PathExists(filename_));
SafeBrowsingStoreTestStorePrefix(store_.get());
- EXPECT_TRUE(file_util::PathExists(filename_));
+ EXPECT_TRUE(base::PathExists(filename_));
ASSERT_TRUE(store_->BeginUpdate());
EXPECT_FALSE(corruption_detected_);
EXPECT_TRUE(store_->CheckValidity());
@@ -154,7 +154,7 @@ TEST_F(SafeBrowsingStoreFileTest, CheckValidity) {
// Corrupt the payload.
TEST_F(SafeBrowsingStoreFileTest, CheckValidityPayload) {
SafeBrowsingStoreTestStorePrefix(store_.get());
- EXPECT_TRUE(file_util::PathExists(filename_));
+ EXPECT_TRUE(base::PathExists(filename_));
// 37 is the most random prime number. It's also past the header,
// as corrupting the header would fail BeginUpdate() in which case
@@ -176,7 +176,7 @@ TEST_F(SafeBrowsingStoreFileTest, CheckValidityPayload) {
// Corrupt the checksum.
TEST_F(SafeBrowsingStoreFileTest, CheckValidityChecksum) {
SafeBrowsingStoreTestStorePrefix(store_.get());
- EXPECT_TRUE(file_util::PathExists(filename_));
+ EXPECT_TRUE(base::PathExists(filename_));
// An offset from the end of the file which is in the checksum.
const int kOffset = -static_cast<int>(sizeof(base::MD5Digest));

Powered by Google App Engine
This is Rietveld 408576698