diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-11 17:36:07 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-11 17:36:07 +0000 |
commit | 7567484144da059e2c2c2a818b06660a5459052f (patch) | |
tree | a4ceafc7e890051c25dbdd54b170d0f5794dd229 /base/json | |
parent | 8a25d54d6eb190a8b82479b5309a892c1080a372 (diff) | |
download | chromium_src-7567484144da059e2c2c2a818b06660a5459052f.zip chromium_src-7567484144da059e2c2c2a818b06660a5459052f.tar.gz chromium_src-7567484144da059e2c2c2a818b06660a5459052f.tar.bz2 |
Move PathExists to base namespace.
BUG=
TBR=jam@chromium.org
Review URL: https://codereview.chromium.org/18286004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211147 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/json')
-rw-r--r-- | base/json/json_file_value_serializer.cc | 2 | ||||
-rw-r--r-- | base/json/json_reader_unittest.cc | 2 | ||||
-rw-r--r-- | base/json/json_value_serializer_unittest.cc | 14 |
3 files changed, 9 insertions, 9 deletions
diff --git a/base/json/json_file_value_serializer.cc b/base/json/json_file_value_serializer.cc index d6cff33..37371e8 100644 --- a/base/json/json_file_value_serializer.cc +++ b/base/json/json_file_value_serializer.cc @@ -55,7 +55,7 @@ int JSONFileValueSerializer::ReadFileToString(std::string* json_string) { return JSON_ACCESS_DENIED; } #endif - if (!file_util::PathExists(json_file_path_)) + if (!base::PathExists(json_file_path_)) return JSON_NO_SUCH_FILE; else return JSON_CANNOT_READ_FILE; diff --git a/base/json/json_reader_unittest.cc b/base/json/json_reader_unittest.cc index 0180f48..41650b4 100644 --- a/base/json/json_reader_unittest.cc +++ b/base/json/json_reader_unittest.cc @@ -544,7 +544,7 @@ TEST(JSONReaderTest, ReadFromFile) { FilePath path; ASSERT_TRUE(PathService::Get(base::DIR_TEST_DATA, &path)); path = path.AppendASCII("json"); - ASSERT_TRUE(file_util::PathExists(path)); + ASSERT_TRUE(base::PathExists(path)); std::string input; ASSERT_TRUE(file_util::ReadFileToString( diff --git a/base/json/json_value_serializer_unittest.cc b/base/json/json_value_serializer_unittest.cc index 78be11e..ce7129f 100644 --- a/base/json/json_value_serializer_unittest.cc +++ b/base/json/json_value_serializer_unittest.cc @@ -385,7 +385,7 @@ TEST_F(JSONFileValueSerializerTest, Roundtrip) { original_file_path = original_file_path.Append(FILE_PATH_LITERAL("serializer_test.json")); - ASSERT_TRUE(file_util::PathExists(original_file_path)); + ASSERT_TRUE(PathExists(original_file_path)); JSONFileValueSerializer deserializer(original_file_path); scoped_ptr<Value> root; @@ -417,10 +417,10 @@ TEST_F(JSONFileValueSerializerTest, Roundtrip) { const base::FilePath written_file_path = temp_dir_.path().Append(FILE_PATH_LITERAL("test_output.js")); - ASSERT_FALSE(file_util::PathExists(written_file_path)); + ASSERT_FALSE(PathExists(written_file_path)); JSONFileValueSerializer serializer(written_file_path); ASSERT_TRUE(serializer.Serialize(*root)); - ASSERT_TRUE(file_util::PathExists(written_file_path)); + ASSERT_TRUE(PathExists(written_file_path)); // Now compare file contents. EXPECT_TRUE(file_util::TextContentsEqual(original_file_path, @@ -434,7 +434,7 @@ TEST_F(JSONFileValueSerializerTest, RoundtripNested) { original_file_path = original_file_path.Append( FILE_PATH_LITERAL("serializer_nested_test.json")); - ASSERT_TRUE(file_util::PathExists(original_file_path)); + ASSERT_TRUE(PathExists(original_file_path)); JSONFileValueSerializer deserializer(original_file_path); scoped_ptr<Value> root; @@ -445,10 +445,10 @@ TEST_F(JSONFileValueSerializerTest, RoundtripNested) { base::FilePath written_file_path = temp_dir_.path().Append( FILE_PATH_LITERAL("test_output.json")); - ASSERT_FALSE(file_util::PathExists(written_file_path)); + ASSERT_FALSE(PathExists(written_file_path)); JSONFileValueSerializer serializer(written_file_path); ASSERT_TRUE(serializer.Serialize(*root)); - ASSERT_TRUE(file_util::PathExists(written_file_path)); + ASSERT_TRUE(PathExists(written_file_path)); // Now compare file contents. EXPECT_TRUE(file_util::TextContentsEqual(original_file_path, @@ -461,7 +461,7 @@ TEST_F(JSONFileValueSerializerTest, NoWhitespace) { ASSERT_TRUE(PathService::Get(DIR_TEST_DATA, &source_file_path)); source_file_path = source_file_path.Append( FILE_PATH_LITERAL("serializer_test_nowhitespace.json")); - ASSERT_TRUE(file_util::PathExists(source_file_path)); + ASSERT_TRUE(PathExists(source_file_path)); JSONFileValueSerializer serializer(source_file_path); scoped_ptr<Value> root; root.reset(serializer.Deserialize(NULL, NULL)); |