summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-08 21:43:30 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-08 21:43:30 +0000
commit7600d0b2d5e37b211280d5109a6b726644d6be76 (patch)
tree4ba2cb5383bb9ef5f610aeffe5d4455149da683b /net
parenta4f7378f973b38400f133958842eb36db0b61dcb (diff)
downloadchromium_src-7600d0b2d5e37b211280d5109a6b726644d6be76.zip
chromium_src-7600d0b2d5e37b211280d5109a6b726644d6be76.tar.gz
chromium_src-7600d0b2d5e37b211280d5109a6b726644d6be76.tar.bz2
Revert 239400 "Revert 239280 "Move more file_util functions to b..."
Broke all bots 9_9 > Revert 239280 "Move more file_util functions to base namespace." > > dbus_unittests started fialing on Linux Tests (dbg)(2) and Linux Tests (dbg)(2)(32). > This CL is the only in the intersection of CLs in the first failing build on > the two builders, so giving a speculative revert a try (rlarocque already > tried a clobber, it didn't help). > > http://build.chromium.org/p/chromium.linux/builders/Linux%20Tests%20%28dbg%29%282%29/builds/41806 > http://build.chromium.org/p/chromium.linux/builders/Linux%20Tests%20%28dbg%29%282%29%2832%29/builds/8544 > > > > Move more file_util functions to base namespace. > > > > TBR=sky > > > > Review URL: https://codereview.chromium.org/109043002 > > TBR=brettw@chromium.org > > Review URL: https://codereview.chromium.org/105823009 TBR=thakis@chromium.org Review URL: https://codereview.chromium.org/100923007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@239401 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/android/keystore_unittest.cc5
-rw-r--r--net/base/file_stream_unittest.cc2
-rw-r--r--net/base/net_log_logger_unittest.cc6
-rw-r--r--net/disk_cache/backend_unittest.cc2
-rw-r--r--net/disk_cache/cache_util_unittest.cc12
-rw-r--r--net/proxy/proxy_config_service_linux.cc2
-rw-r--r--net/tools/dump_cache/cache_dumper.cc4
-rw-r--r--net/url_request/url_request_unittest.cc2
8 files changed, 17 insertions, 18 deletions
diff --git a/net/android/keystore_unittest.cc b/net/android/keystore_unittest.cc
index 98944e2..58e3da7 100644
--- a/net/android/keystore_unittest.cc
+++ b/net/android/keystore_unittest.cc
@@ -117,8 +117,7 @@ EVP_PKEY* ImportPrivateKeyFile(const char* filename) {
// Load file in memory.
base::FilePath certs_dir = GetTestCertsDirectory();
base::FilePath file_path = certs_dir.AppendASCII(filename);
- ScopedStdioHandle handle(
- file_util::OpenFile(file_path, "rb"));
+ ScopedStdioHandle handle(base::OpenFile(file_path, "rb"));
if (!handle.get()) {
LOG(ERROR) << "Could not open private key file: " << filename;
return NULL;
@@ -167,7 +166,7 @@ EVP_PKEY* ImportPublicKeyFile(const char* filename) {
// Load file as PEM data.
base::FilePath certs_dir = GetTestCertsDirectory();
base::FilePath file_path = certs_dir.AppendASCII(filename);
- ScopedStdioHandle handle(file_util::OpenFile(file_path, "rb"));
+ ScopedStdioHandle handle(base::OpenFile(file_path, "rb"));
if (!handle.get()) {
LOG(ERROR) << "Could not open public key file: " << filename;
return NULL;
diff --git a/net/base/file_stream_unittest.cc b/net/base/file_stream_unittest.cc
index 6f35985..b055c78 100644
--- a/net/base/file_stream_unittest.cc
+++ b/net/base/file_stream_unittest.cc
@@ -200,7 +200,7 @@ TEST_F(FileStreamTest, UseFileHandle) {
// Read into buffer and compare to make sure the handle worked fine.
ASSERT_EQ(kTestDataSize,
- file_util::ReadFile(temp_file_path(), buffer, kTestDataSize));
+ base::ReadFile(temp_file_path(), buffer, kTestDataSize));
ASSERT_EQ(0, memcmp(kTestData, buffer, kTestDataSize));
}
diff --git a/net/base/net_log_logger_unittest.cc b/net/base/net_log_logger_unittest.cc
index 3dd6915..05c16c7 100644
--- a/net/base/net_log_logger_unittest.cc
+++ b/net/base/net_log_logger_unittest.cc
@@ -28,7 +28,7 @@ class NetLogLoggerTest : public testing::Test {
TEST_F(NetLogLoggerTest, GeneratesValidJSONForNoEvents) {
{
// Create and destroy a logger.
- FILE* file = file_util::OpenFile(log_path_, "w");
+ FILE* file = base::OpenFile(log_path_, "w");
ASSERT_TRUE(file);
scoped_ptr<base::Value> constants(NetLogLogger::GetConstants());
NetLogLogger logger(file, *constants);
@@ -50,7 +50,7 @@ TEST_F(NetLogLoggerTest, GeneratesValidJSONForNoEvents) {
TEST_F(NetLogLoggerTest, GeneratesValidJSONWithOneEvent) {
{
- FILE* file = file_util::OpenFile(log_path_, "w");
+ FILE* file = base::OpenFile(log_path_, "w");
ASSERT_TRUE(file);
scoped_ptr<base::Value> constants(NetLogLogger::GetConstants());
NetLogLogger logger(file, *constants);
@@ -82,7 +82,7 @@ TEST_F(NetLogLoggerTest, GeneratesValidJSONWithOneEvent) {
TEST_F(NetLogLoggerTest, GeneratesValidJSONWithMultipleEvents) {
{
- FILE* file = file_util::OpenFile(log_path_, "w");
+ FILE* file = base::OpenFile(log_path_, "w");
ASSERT_TRUE(file);
scoped_ptr<base::Value> constants(NetLogLogger::GetConstants());
NetLogLogger logger(file, *constants);
diff --git a/net/disk_cache/backend_unittest.cc b/net/disk_cache/backend_unittest.cc
index c7b37e4..b25001f 100644
--- a/net/disk_cache/backend_unittest.cc
+++ b/net/disk_cache/backend_unittest.cc
@@ -489,7 +489,7 @@ TEST_F(DiskCacheBackendTest, ExternalFiles) {
// And verify that the first file is still there.
scoped_refptr<net::IOBuffer> buffer2(new net::IOBuffer(kSize));
- ASSERT_EQ(kSize, file_util::ReadFile(filename, buffer2->data(), kSize));
+ ASSERT_EQ(kSize, base::ReadFile(filename, buffer2->data(), kSize));
EXPECT_EQ(0, memcmp(buffer1->data(), buffer2->data(), kSize));
}
diff --git a/net/disk_cache/cache_util_unittest.cc b/net/disk_cache/cache_util_unittest.cc
index b86290f..3a05196 100644
--- a/net/disk_cache/cache_util_unittest.cc
+++ b/net/disk_cache/cache_util_unittest.cc
@@ -21,16 +21,16 @@ class CacheUtilTest : public PlatformTest {
dir1_ = base::FilePath(cache_dir_.Append(FILE_PATH_LITERAL("dir01")));
file3_ = base::FilePath(dir1_.Append(FILE_PATH_LITERAL("file03")));
ASSERT_TRUE(base::CreateDirectory(cache_dir_));
- FILE *fp = file_util::OpenFile(file1_, "w");
+ FILE *fp = base::OpenFile(file1_, "w");
ASSERT_TRUE(fp != NULL);
- file_util::CloseFile(fp);
- fp = file_util::OpenFile(file2_, "w");
+ base::CloseFile(fp);
+ fp = base::OpenFile(file2_, "w");
ASSERT_TRUE(fp != NULL);
- file_util::CloseFile(fp);
+ base::CloseFile(fp);
ASSERT_TRUE(base::CreateDirectory(dir1_));
- fp = file_util::OpenFile(file3_, "w");
+ fp = base::OpenFile(file3_, "w");
ASSERT_TRUE(fp != NULL);
- file_util::CloseFile(fp);
+ base::CloseFile(fp);
dest_dir_ = tmp_dir_.path().Append(FILE_PATH_LITERAL("old_Cache_001"));
dest_file1_ = base::FilePath(dest_dir_.Append(FILE_PATH_LITERAL("file01")));
dest_file2_ =
diff --git a/net/proxy/proxy_config_service_linux.cc b/net/proxy/proxy_config_service_linux.cc
index c39dd87..d01e5e6 100644
--- a/net/proxy/proxy_config_service_linux.cc
+++ b/net/proxy/proxy_config_service_linux.cc
@@ -1171,7 +1171,7 @@ class SettingGetterImplKDE : public ProxyConfigServiceLinux::SettingGetter,
// each relevant name-value pair to the appropriate value table.
void UpdateCachedSettings() {
base::FilePath kioslaverc = kde_config_dir_.Append("kioslaverc");
- file_util::ScopedFILE input(file_util::OpenFile(kioslaverc, "r"));
+ file_util::ScopedFILE input(base::OpenFile(kioslaverc, "r"));
if (!input.get())
return;
ResetCachedSettings();
diff --git a/net/tools/dump_cache/cache_dumper.cc b/net/tools/dump_cache/cache_dumper.cc
index ad9a79c..7d29a5c 100644
--- a/net/tools/dump_cache/cache_dumper.cc
+++ b/net/tools/dump_cache/cache_dumper.cc
@@ -108,7 +108,7 @@ int DiskDumper::CreateEntry(const std::string& key,
wprintf(L"CreateFileW (%s) failed: %d\n", file.c_str(), GetLastError());
return (entry_ != INVALID_HANDLE_VALUE) ? net::OK : net::ERR_FAILED;
#else
- entry_ = file_util::OpenFile(entry_path_, "w+");
+ entry_ = base::OpenFile(entry_path_, "w+");
return (entry_ != NULL) ? net::OK : net::ERR_FAILED;
#endif
}
@@ -218,6 +218,6 @@ void DiskDumper::CloseEntry(disk_cache::Entry* entry, base::Time last_used,
#ifdef WIN32_LARGE_FILENAME_SUPPORT
CloseHandle(entry_);
#else
- file_util::CloseFile(entry_);
+ base::CloseFile(entry_);
#endif
}
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index 79e7967..116808c 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -4726,7 +4726,7 @@ TEST_F(URLRequestTestHTTP, PostFileTest) {
ASSERT_EQ(true, base::GetFileSize(path, &size));
scoped_ptr<char[]> buf(new char[size]);
- ASSERT_EQ(size, file_util::ReadFile(path, buf.get(), size));
+ ASSERT_EQ(size, base::ReadFile(path, buf.get(), size));
ASSERT_EQ(1, d.response_started_count())
<< "request failed: " << r.status().status()