diff options
Diffstat (limited to 'content')
14 files changed, 24 insertions, 24 deletions
diff --git a/content/browser/browser_shutdown_profile_dumper.cc b/content/browser/browser_shutdown_profile_dumper.cc index ebec936..3e74e06 100644 --- a/content/browser/browser_shutdown_profile_dumper.cc +++ b/content/browser/browser_shutdown_profile_dumper.cc @@ -37,7 +37,7 @@ void BrowserShutdownProfileDumper::WriteTracesToDisc( base::debug::TraceLog::GetInstance()->GetBufferPercentFull() << " full."; DCHECK(!dump_file_); - dump_file_ = file_util::OpenFile(file_name, "w+"); + dump_file_ = base::OpenFile(file_name, "w+"); if (!IsFileValid()) { LOG(ERROR) << "Failed to open performance trace file: " << file_name.value(); @@ -131,7 +131,7 @@ void BrowserShutdownProfileDumper::WriteChars(const char* chars, size_t size) { void BrowserShutdownProfileDumper::CloseFile() { if (!dump_file_) return; - file_util::CloseFile(dump_file_); + base::CloseFile(dump_file_); dump_file_ = NULL; } diff --git a/content/browser/fileapi/file_system_operation_impl_unittest.cc b/content/browser/fileapi/file_system_operation_impl_unittest.cc index 236cc8e..445657d 100644 --- a/content/browser/fileapi/file_system_operation_impl_unittest.cc +++ b/content/browser/fileapi/file_system_operation_impl_unittest.cc @@ -689,8 +689,8 @@ TEST_F(FileSystemOperationImplTest, TestCopyInForeignFileSuccess) { // Compare contents of src and copied file. char buffer[100]; - EXPECT_EQ(data_size, file_util::ReadFile(PlatformPath("dest/file"), - buffer, data_size)); + EXPECT_EQ(data_size, base::ReadFile(PlatformPath("dest/file"), + buffer, data_size)); for (int i = 0; i < data_size; ++i) EXPECT_EQ(test_data[i], buffer[i]); } @@ -1009,7 +1009,7 @@ TEST_F(FileSystemOperationImplTest, TestTruncate) { // data. EXPECT_EQ(length, GetFileSize("file")); char data[100]; - EXPECT_EQ(length, file_util::ReadFile(platform_path, data, length)); + EXPECT_EQ(length, base::ReadFile(platform_path, data, length)); for (int i = 0; i < length; ++i) { if (i < static_cast<int>(sizeof(test_data))) EXPECT_EQ(test_data[i], data[i]); @@ -1028,7 +1028,7 @@ TEST_F(FileSystemOperationImplTest, TestTruncate) { // Check that its length is now 3 and that it contains only bits of test data. EXPECT_EQ(length, GetFileSize("file")); - EXPECT_EQ(length, file_util::ReadFile(platform_path, data, length)); + EXPECT_EQ(length, base::ReadFile(platform_path, data, length)); for (int i = 0; i < length; ++i) EXPECT_EQ(test_data[i], data[i]); diff --git a/content/browser/renderer_host/media/video_capture_host_unittest.cc b/content/browser/renderer_host/media/video_capture_host_unittest.cc index a4e79e8..1c169a4 100644 --- a/content/browser/renderer_host/media/video_capture_host_unittest.cc +++ b/content/browser/renderer_host/media/video_capture_host_unittest.cc @@ -60,7 +60,7 @@ class DumpVideo { void StartDump(int width, int height) { base::FilePath file_name = base::FilePath(base::StringPrintf( FILE_PATH_LITERAL("dump_w%d_h%d.yuv"), width, height)); - file_.reset(file_util::OpenFile(file_name, "wb")); + file_.reset(base::OpenFile(file_name, "wb")); expected_size_ = media::VideoFrame::AllocationSize( media::VideoFrame::I420, gfx::Size(width, height)); } diff --git a/content/browser/tracing/tracing_controller_impl.cc b/content/browser/tracing/tracing_controller_impl.cc index ba9f2e0..bc7cee2 100644 --- a/content/browser/tracing/tracing_controller_impl.cc +++ b/content/browser/tracing/tracing_controller_impl.cc @@ -68,7 +68,7 @@ TracingControllerImpl::ResultFile::ResultFile(const base::FilePath& path) void TracingControllerImpl::ResultFile::OpenTask() { if (path_.empty()) base::CreateTemporaryFile(&path_); - file_ = file_util::OpenFile(path_, "w"); + file_ = base::OpenFile(path_, "w"); if (!file_) { LOG(ERROR) << "Failed to open " << path_.value(); return; @@ -104,7 +104,7 @@ void TracingControllerImpl::ResultFile::CloseTask( const char* trailout = "]}"; size_t written = fwrite(trailout, strlen(trailout), 1, file_); DCHECK(written == 1); - file_util::CloseFile(file_); + base::CloseFile(file_); file_ = NULL; BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, callback); diff --git a/content/child/npapi/plugin_stream_posix.cc b/content/child/npapi/plugin_stream_posix.cc index b84a6d9..8c74d83 100644 --- a/content/child/npapi/plugin_stream_posix.cc +++ b/content/child/npapi/plugin_stream_posix.cc @@ -34,7 +34,7 @@ bool PluginStream::OpenTempFile() { DCHECK_EQ(static_cast<FILE*>(NULL), temp_file_); if (base::CreateTemporaryFile(&temp_file_path_)) - temp_file_ = file_util::OpenFile(temp_file_path_, "a"); + temp_file_ = base::OpenFile(temp_file_path_, "a"); if (!temp_file_) { base::DeleteFile(temp_file_path_, false); @@ -48,7 +48,7 @@ void PluginStream::CloseTempFile() { if (!TempFileIsValid()) return; - file_util::CloseFile(temp_file_); + base::CloseFile(temp_file_); ResetTempFileHandle(); } diff --git a/content/common/gpu/client/gl_helper_benchmark.cc b/content/common/gpu/client/gl_helper_benchmark.cc index 43ce6b6..f9385fd 100644 --- a/content/common/gpu/client/gl_helper_benchmark.cc +++ b/content/common/gpu/client/gl_helper_benchmark.cc @@ -102,11 +102,11 @@ class GLHelperTest : public testing::Test { std::vector<gfx::PNGCodec::Comment>(), &compressed)); ASSERT_TRUE(compressed.size()); - FILE* f = file_util::OpenFile(filename, "wb"); + FILE* f = base::OpenFile(filename, "wb"); ASSERT_TRUE(f); ASSERT_EQ(fwrite(&*compressed.begin(), 1, compressed.size(), f), compressed.size()); - file_util::CloseFile(f); + base::CloseFile(f); } scoped_ptr<webkit::gpu::WebGraphicsContext3DInProcessCommandBufferImpl> diff --git a/content/common/mac/font_loader.mm b/content/common/mac/font_loader.mm index d919680..66b143f 100644 --- a/content/common/mac/font_loader.mm +++ b/content/common/mac/font_loader.mm @@ -140,9 +140,9 @@ void FontLoader::LoadFont(const FontDescriptor& font, return; } - int32 amt_read = file_util::ReadFile(font_path, - reinterpret_cast<char*>(result->font_data.memory()), - font_file_size_32); + int32 amt_read = base::ReadFile(font_path, + reinterpret_cast<char*>(result->font_data.memory()), + font_file_size_32); if (amt_read != font_file_size_32) { DLOG(ERROR) << "Failed to read font data for " << font_path.value(); return; diff --git a/content/common/page_state_serialization_unittest.cc b/content/common/page_state_serialization_unittest.cc index c0c98d3..c23a2fb 100644 --- a/content/common/page_state_serialization_unittest.cc +++ b/content/common/page_state_serialization_unittest.cc @@ -379,7 +379,7 @@ TEST_F(PageStateSerializationTest, DumpExpectedPageStateForBackwardsCompat) { PathService::Get(base::DIR_TEMP, &path); path = path.AppendASCII("expected.dat"); - FILE* fp = file_util::OpenFile(path, "wb"); + FILE* fp = base::OpenFile(path, "wb"); ASSERT_TRUE(fp); const size_t kRowSize = 76; diff --git a/content/common/plugin_list_posix.cc b/content/common/plugin_list_posix.cc index afe35d2..acd7830 100644 --- a/content/common/plugin_list_posix.cc +++ b/content/common/plugin_list_posix.cc @@ -180,7 +180,7 @@ bool ELFMatchesCurrentArchitecture(const base::FilePath& filename) { const size_t kELFBufferSize = 5; char buffer[kELFBufferSize]; - if (!file_util::ReadFile(filename, buffer, kELFBufferSize)) + if (!base::ReadFile(filename, buffer, kELFBufferSize)) return false; if (buffer[0] != ELFMAG0 || diff --git a/content/gpu/gpu_watchdog_thread.cc b/content/gpu/gpu_watchdog_thread.cc index b644aec..940d07e 100644 --- a/content/gpu/gpu_watchdog_thread.cc +++ b/content/gpu/gpu_watchdog_thread.cc @@ -57,7 +57,7 @@ GpuWatchdogThread::GpuWatchdogThread(int timeout) #endif #if defined(OS_CHROMEOS) - tty_file_ = file_util::OpenFile(base::FilePath(kTtyFilePath), "r"); + tty_file_ = base::OpenFile(base::FilePath(kTtyFilePath), "r"); #endif watched_message_loop_->AddTaskObserver(&task_observer_); } diff --git a/content/renderer/media/media_stream_audio_processor_unittest.cc b/content/renderer/media/media_stream_audio_processor_unittest.cc index 79311c8..1a6409c 100644 --- a/content/renderer/media/media_stream_audio_processor_unittest.cc +++ b/content/renderer/media/media_stream_audio_processor_unittest.cc @@ -46,7 +46,7 @@ void ReadDataFromSpeechFile(char* data, int length) { DCHECK(base::PathExists(file)); int64 data_file_size64 = 0; DCHECK(base::GetFileSize(file, &data_file_size64)); - EXPECT_EQ(length, file_util::ReadFile(file, data, length)); + EXPECT_EQ(length, base::ReadFile(file, data, length)); DCHECK(data_file_size64 > length); } diff --git a/content/renderer/media/webrtc_audio_device_unittest.cc b/content/renderer/media/webrtc_audio_device_unittest.cc index 5e111a5..73f0885 100644 --- a/content/renderer/media/webrtc_audio_device_unittest.cc +++ b/content/renderer/media/webrtc_audio_device_unittest.cc @@ -296,7 +296,7 @@ void ReadDataFromSpeechFile(char* data, int length) { DCHECK(base::PathExists(data_file)); int64 data_file_size64 = 0; DCHECK(base::GetFileSize(data_file, &data_file_size64)); - EXPECT_EQ(length, file_util::ReadFile(data_file, data, length)); + EXPECT_EQ(length, base::ReadFile(data_file, data, length)); DCHECK(data_file_size64 > length); } diff --git a/content/test/plugin/plugin_geturl_test.cc b/content/test/plugin/plugin_geturl_test.cc index 8bc62e0..c9b344d 100644 --- a/content/test/plugin/plugin_geturl_test.cc +++ b/content/test/plugin/plugin_geturl_test.cc @@ -212,7 +212,7 @@ NPError PluginGetURLTest::NewStream(NPMIMEType type, NPStream* stream, base::FilePath path = base::FilePath(filename); #endif - test_file_ = file_util::OpenFile(path, "r"); + test_file_ = base::OpenFile(path, "r"); if (!test_file_) { SetError("Could not open source file"); } @@ -356,7 +356,7 @@ NPError PluginGetURLTest::DestroyStream(NPStream *stream, NPError reason) { size_t bytes = fread(read_buffer, 1, sizeof(read_buffer), test_file_); if (bytes != 0) SetError("Data and source mismatch on length"); - file_util::CloseFile(test_file_); + base::CloseFile(test_file_); } break; default: diff --git a/content/test/weburl_loader_mock_factory.cc b/content/test/weburl_loader_mock_factory.cc index 38a9d50..f4aa677 100644 --- a/content/test/weburl_loader_mock_factory.cc +++ b/content/test/weburl_loader_mock_factory.cc @@ -182,7 +182,7 @@ bool WebURLLoaderMockFactory::ReadFile(const base::FilePath& file_path, int size = static_cast<int>(file_size); scoped_ptr<char[]> buffer(new char[size]); data->reset(); - int read_count = file_util::ReadFile(file_path, buffer.get(), size); + int read_count = base::ReadFile(file_path, buffer.get(), size); if (read_count == -1) return false; DCHECK(read_count == size); |