diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-14 10:12:56 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-14 10:12:56 +0000 |
commit | 6d7f55fec25ef2b80d3bae5b86ab905eb90f970f (patch) | |
tree | 2f2035579ca80d5823b0dd28f1637bae3f2023c2 | |
parent | d61f1f3fb2e0d4ad82a56e5160c5e6b8260ed3a0 (diff) | |
download | chromium_src-6d7f55fec25ef2b80d3bae5b86ab905eb90f970f.zip chromium_src-6d7f55fec25ef2b80d3bae5b86ab905eb90f970f.tar.gz chromium_src-6d7f55fec25ef2b80d3bae5b86ab905eb90f970f.tar.bz2 |
Cleanup: Remove unneeded base/file_util.h includes in base.
Review URL: https://chromiumcodereview.appspot.com/15078003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199960 0039d316-1c4b-4281-b951-d872f2087c98
23 files changed, 40 insertions, 40 deletions
diff --git a/base/base_paths_win.cc b/base/base_paths_win.cc index f4dd434..bc88335 100644 --- a/base/base_paths_win.cc +++ b/base/base_paths_win.cc @@ -2,12 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. - #include <windows.h> #include <shlobj.h> #include "base/base_paths.h" -#include "base/file_util.h" #include "base/files/file_path.h" #include "base/path_service.h" #include "base/win/scoped_co_mem.h" @@ -53,7 +51,6 @@ bool GetQuickLaunchPath(bool default_user, FilePath* result) { namespace base { bool PathProviderWin(int key, FilePath* result) { - // We need to go compute the value. It would be nice to support paths with // names longer than MAX_PATH, but the system functions don't seem to be // designed for it either, with the exception of GetTempPath (but other diff --git a/base/file_version_info_unittest.cc b/base/file_version_info_unittest.cc index 515297b3..5c899ba 100644 --- a/base/file_version_info_unittest.cc +++ b/base/file_version_info_unittest.cc @@ -2,10 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "base/file_util.h" +#include "base/file_version_info.h" +#include "base/files/file_path.h" #include "base/memory/scoped_ptr.h" #include "base/path_service.h" -#include "base/file_version_info.h" #include "testing/gtest/include/gtest/gtest.h" #if defined(OS_WIN) @@ -27,7 +27,7 @@ FilePath GetTestDataPath() { } #endif -} +} // namespace #if defined(OS_WIN) TEST(FileVersionInfoTest, HardCodedProperties) { diff --git a/base/files/file_path_unittest.cc b/base/files/file_path_unittest.cc index 28778d9..dbc9244 100644 --- a/base/files/file_path_unittest.cc +++ b/base/files/file_path_unittest.cc @@ -3,7 +3,6 @@ // found in the LICENSE file. #include "base/basictypes.h" -#include "base/file_util.h" #include "base/files/file_path.h" #include "base/utf_string_conversions.h" #include "testing/gtest/include/gtest/gtest.h" @@ -1122,32 +1121,32 @@ TEST_F(FilePathTest, FromUTF8Unsafe_And_AsUTF8Unsafe) { TEST_F(FilePathTest, ConstructWithNUL) { // Assert FPS() works. - ASSERT_TRUE(FPS("a\0b").length() == 3); + ASSERT_EQ(3U, FPS("a\0b").length()); // Test constructor strips '\0' FilePath path(FPS("a\0b")); - EXPECT_TRUE(path.value().length() == 1); - EXPECT_EQ(path.value(), FPL("a")); + EXPECT_EQ(1U, path.value().length()); + EXPECT_EQ(FPL("a"), path.value()); } TEST_F(FilePathTest, AppendWithNUL) { // Assert FPS() works. - ASSERT_TRUE(FPS("b\0b").length() == 3); + ASSERT_EQ(3U, FPS("b\0b").length()); // Test Append() strips '\0' FilePath path(FPL("a")); path = path.Append(FPS("b\0b")); - EXPECT_TRUE(path.value().length() == 3); + EXPECT_EQ(3U, path.value().length()); #if defined(FILE_PATH_USES_WIN_SEPARATORS) - EXPECT_EQ(path.value(), FPL("a\\b")); + EXPECT_EQ(FPL("a\\b"), path.value()); #else - EXPECT_EQ(path.value(), FPL("a/b")); + EXPECT_EQ(FPL("a/b"), path.value()); #endif } TEST_F(FilePathTest, ReferencesParentWithNUL) { // Assert FPS() works. - ASSERT_TRUE(FPS("..\0").length() == 3); + ASSERT_EQ(3U, FPS("..\0").length()); // Test ReferencesParent() doesn't break with "..\0" FilePath path(FPS("..\0")); diff --git a/base/files/file_path_watcher_kqueue.cc b/base/files/file_path_watcher_kqueue.cc index 1c086de..64c9d59 100644 --- a/base/files/file_path_watcher_kqueue.cc +++ b/base/files/file_path_watcher_kqueue.cc @@ -171,7 +171,7 @@ int FilePathWatcherImpl::EventsForPath(FilePath path, EventVector* events) { int last_existing_entry = 0; FilePath built_path; bool path_still_exists = true; - for(std::vector<FilePath::StringType>::iterator i = components.begin(); + for (std::vector<FilePath::StringType>::iterator i = components.begin(); i != components.end(); ++i) { if (i == components.begin()) { built_path = FilePath(*i); diff --git a/base/files/file_util_proxy.h b/base/files/file_util_proxy.h index d155355..c5168ad 100644 --- a/base/files/file_util_proxy.h +++ b/base/files/file_util_proxy.h @@ -7,7 +7,6 @@ #include "base/base_export.h" #include "base/callback_forward.h" -#include "base/file_util.h" #include "base/files/file_path.h" #include "base/memory/ref_counted.h" #include "base/platform_file.h" diff --git a/base/files/file_util_proxy_unittest.cc b/base/files/file_util_proxy_unittest.cc index 9a5a0d6..ef23fd8 100644 --- a/base/files/file_util_proxy_unittest.cc +++ b/base/files/file_util_proxy_unittest.cc @@ -7,6 +7,7 @@ #include <map> #include "base/bind.h" +#include "base/file_util.h" #include "base/files/scoped_temp_dir.h" #include "base/logging.h" #include "base/memory/weak_ptr.h" @@ -194,17 +195,17 @@ TEST_F(FileUtilProxyTest, CreateTemporary) { // The file should be writable. #if defined(OS_WIN) - HANDLE hEvent = CreateEvent(NULL, FALSE, FALSE, NULL); - OVERLAPPED overlapped = {0}; - overlapped.hEvent = hEvent; - DWORD bytes_written; - if (!::WriteFile(file_, "test", 4, &bytes_written, &overlapped)) { - // Temporary file is created with ASYNC flag, so WriteFile may return 0 - // with ERROR_IO_PENDING. - EXPECT_EQ(ERROR_IO_PENDING, GetLastError()); - GetOverlappedResult(file_, &overlapped, &bytes_written, TRUE); - } - EXPECT_EQ(4, bytes_written); + HANDLE hEvent = CreateEvent(NULL, FALSE, FALSE, NULL); + OVERLAPPED overlapped = {0}; + overlapped.hEvent = hEvent; + DWORD bytes_written; + if (!::WriteFile(file_, "test", 4, &bytes_written, &overlapped)) { + // Temporary file is created with ASYNC flag, so WriteFile may return 0 + // with ERROR_IO_PENDING. + EXPECT_EQ(ERROR_IO_PENDING, GetLastError()); + GetOverlappedResult(file_, &overlapped, &bytes_written, TRUE); + } + EXPECT_EQ(4, bytes_written); #else // On POSIX ASYNC flag does not affect synchronous read/write behavior. EXPECT_EQ(4, WritePlatformFile(file_, 0, "test", 4)); diff --git a/base/i18n/icu_util.cc b/base/i18n/icu_util.cc index 4e7ecdd..8368790 100644 --- a/base/i18n/icu_util.cc +++ b/base/i18n/icu_util.cc @@ -12,7 +12,6 @@ #include <string> -#include "base/file_util.h" #include "base/files/file_path.h" #include "base/files/memory_mapped_file.h" #include "base/logging.h" diff --git a/base/memory/singleton_unittest.cc b/base/memory/singleton_unittest.cc index d9892cb..5d05904 100644 --- a/base/memory/singleton_unittest.cc +++ b/base/memory/singleton_unittest.cc @@ -3,7 +3,6 @@ // found in the LICENSE file. #include "base/at_exit.h" -#include "base/file_util.h" #include "base/memory/singleton.h" #include "base/path_service.h" #include "testing/gtest/include/gtest/gtest.h" diff --git a/base/process_util_freebsd.cc b/base/process_util_freebsd.cc index 3be93c2..cb5a2db 100644 --- a/base/process_util_freebsd.cc +++ b/base/process_util_freebsd.cc @@ -17,7 +17,6 @@ #include <time.h> #include <unistd.h> -#include "base/file_util.h" #include "base/logging.h" #include "base/string_tokenizer.h" #include "base/string_util.h" @@ -65,7 +64,7 @@ ProcessIterator::ProcessIterator(const ProcessFilter* filter) do { size_t len = 0; - if (sysctl(mib, arraysize(mib), NULL, &len, NULL, 0) <0 ){ + if (sysctl(mib, arraysize(mib), NULL, &len, NULL, 0) < 0) { LOG(ERROR) << "failed to get the size needed for the process list"; kinfo_procs_.resize(0); done = true; @@ -105,7 +104,7 @@ ProcessIterator::~ProcessIterator() { bool ProcessIterator::CheckForNextProcess() { std::string data; - for (; index_of_kinfo_proc_ < kinfo_procs_.size(); ++ index_of_kinfo_proc_) { + for (; index_of_kinfo_proc_ < kinfo_procs_.size(); ++index_of_kinfo_proc_) { size_t length; struct kinfo_proc kinfo = kinfo_procs_[index_of_kinfo_proc_]; int mib[] = { CTL_KERN, KERN_PROC_ARGS, kinfo.ki_pid }; @@ -157,7 +156,7 @@ bool ProcessIterator::CheckForNextProcess() { } bool NamedProcessIterator::IncludeEntry() { - if(executable_name_ != entry().exe_file()) + if (executable_name_ != entry().exe_file()) return false; return ProcessIterator::IncludeEntry(); diff --git a/base/process_util_openbsd.cc b/base/process_util_openbsd.cc index 328f45b..099c2b4 100644 --- a/base/process_util_openbsd.cc +++ b/base/process_util_openbsd.cc @@ -18,7 +18,6 @@ #include <time.h> #include <unistd.h> -#include "base/file_util.h" #include "base/logging.h" #include "base/string_tokenizer.h" #include "base/string_util.h" @@ -211,7 +210,6 @@ size_t ProcessMetrics::GetPagefileUsage() const { } size_t ProcessMetrics::GetPeakPagefileUsage() const { - return 0; } @@ -233,7 +231,6 @@ size_t ProcessMetrics::GetWorkingSetSize() const { } size_t ProcessMetrics::GetPeakWorkingSetSize() const { - return 0; } diff --git a/base/sync_socket_nacl.cc b/base/sync_socket_nacl.cc index 6d6405d..7bab884 100644 --- a/base/sync_socket_nacl.cc +++ b/base/sync_socket_nacl.cc @@ -9,7 +9,6 @@ #include <stdio.h> #include <sys/types.h> -#include "base/file_util.h" #include "base/logging.h" diff --git a/chrome/browser/media_galleries/fileapi/native_media_file_util.cc b/chrome/browser/media_galleries/fileapi/native_media_file_util.cc index 38a8c12..bc79298 100644 --- a/chrome/browser/media_galleries/fileapi/native_media_file_util.cc +++ b/chrome/browser/media_galleries/fileapi/native_media_file_util.cc @@ -4,6 +4,7 @@ #include "chrome/browser/media_galleries/fileapi/native_media_file_util.h" +#include "base/file_util.h" #include "base/memory/scoped_generic_obj.h" #include "base/string_util.h" #include "chrome/browser/media_galleries/fileapi/filtering_file_enumerator.h" diff --git a/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc b/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc index 1c20453..bcfbd88 100644 --- a/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc +++ b/chrome/browser/media_galleries/fileapi/native_media_file_util_unittest.cc @@ -6,6 +6,7 @@ #include <string> #include "base/bind.h" +#include "base/file_util.h" #include "base/files/scoped_temp_dir.h" #include "base/format_macros.h" #include "base/message_loop.h" diff --git a/chrome/browser/nacl_host/nacl_browser.cc b/chrome/browser/nacl_host/nacl_browser.cc index fa733c6..d05d42e 100644 --- a/chrome/browser/nacl_host/nacl_browser.cc +++ b/chrome/browser/nacl_host/nacl_browser.cc @@ -5,6 +5,7 @@ #include "chrome/browser/nacl_host/nacl_browser.h" #include "base/command_line.h" +#include "base/file_util.h" #include "base/message_loop.h" #include "base/metrics/histogram.h" #include "base/path_service.h" diff --git a/chrome/browser/nacl_host/nacl_process_host.cc b/chrome/browser/nacl_host/nacl_process_host.cc index 50d9616..26a1df5 100644 --- a/chrome/browser/nacl_host/nacl_process_host.cc +++ b/chrome/browser/nacl_host/nacl_process_host.cc @@ -10,6 +10,7 @@ #include "base/base_switches.h" #include "base/bind.h" #include "base/command_line.h" +#include "base/file_util.h" #include "base/message_loop.h" #include "base/metrics/histogram.h" #include "base/path_service.h" @@ -60,7 +61,6 @@ #elif defined(OS_WIN) #include <windows.h> -#include "base/process_util.h" #include "base/threading/thread.h" #include "base/win/scoped_handle.h" #include "chrome/browser/nacl_host/nacl_broker_service_win.h" diff --git a/webkit/fileapi/isolated_file_util.cc b/webkit/fileapi/isolated_file_util.cc index dd3367a..4badb15 100644 --- a/webkit/fileapi/isolated_file_util.cc +++ b/webkit/fileapi/isolated_file_util.cc @@ -7,6 +7,7 @@ #include <string> #include <vector> +#include "base/file_util.h" #include "webkit/blob/shareable_file_reference.h" #include "webkit/fileapi/file_system_context.h" #include "webkit/fileapi/file_system_operation_context.h" diff --git a/webkit/fileapi/local_file_system_operation_unittest.cc b/webkit/fileapi/local_file_system_operation_unittest.cc index 82ea8ac..f2b6cbb 100644 --- a/webkit/fileapi/local_file_system_operation_unittest.cc +++ b/webkit/fileapi/local_file_system_operation_unittest.cc @@ -5,6 +5,7 @@ #include "webkit/fileapi/local_file_system_operation.h" #include "base/bind.h" +#include "base/file_util.h" #include "base/files/scoped_temp_dir.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" diff --git a/webkit/fileapi/local_file_system_quota_unittest.cc b/webkit/fileapi/local_file_system_quota_unittest.cc index 3b759af..383d818 100644 --- a/webkit/fileapi/local_file_system_quota_unittest.cc +++ b/webkit/fileapi/local_file_system_quota_unittest.cc @@ -8,6 +8,7 @@ // 3) the result of QuotaManager::GetUsageAndQuota. #include "base/bind.h" +#include "base/file_util.h" #include "base/files/scoped_temp_dir.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" diff --git a/webkit/fileapi/local_file_util.cc b/webkit/fileapi/local_file_util.cc index 4760423..d08cc49 100644 --- a/webkit/fileapi/local_file_util.cc +++ b/webkit/fileapi/local_file_util.cc @@ -4,6 +4,7 @@ #include "webkit/fileapi/local_file_util.h" +#include "base/file_util.h" #include "base/files/file_util_proxy.h" #include "googleurl/src/gurl.h" #include "webkit/fileapi/file_system_context.h" diff --git a/webkit/fileapi/local_file_util_unittest.cc b/webkit/fileapi/local_file_util_unittest.cc index 8f175fe..8790467 100644 --- a/webkit/fileapi/local_file_util_unittest.cc +++ b/webkit/fileapi/local_file_util_unittest.cc @@ -4,6 +4,7 @@ #include <string> +#include "base/file_util.h" #include "base/files/file_path.h" #include "base/files/scoped_temp_dir.h" #include "base/message_loop.h" diff --git a/webkit/fileapi/native_file_util_unittest.cc b/webkit/fileapi/native_file_util_unittest.cc index 1f31fb7..b357057 100644 --- a/webkit/fileapi/native_file_util_unittest.cc +++ b/webkit/fileapi/native_file_util_unittest.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "base/file_util.h" #include "base/files/file_path.h" #include "base/files/scoped_temp_dir.h" #include "base/platform_file.h" @@ -106,7 +107,7 @@ TEST_F(NativeFileUtilTest, CreateAndDeleteDirectory) { false /* recursive */)); ASSERT_EQ(base::PLATFORM_FILE_OK, - NativeFileUtil::DeleteDirectory (dir_name)); + NativeFileUtil::DeleteDirectory(dir_name)); EXPECT_FALSE(file_util::DirectoryExists(dir_name)); EXPECT_FALSE(NativeFileUtil::DirectoryExists(dir_name)); } diff --git a/webkit/fileapi/sandbox_mount_point_provider.cc b/webkit/fileapi/sandbox_mount_point_provider.cc index 27eaa42..3ad9832 100644 --- a/webkit/fileapi/sandbox_mount_point_provider.cc +++ b/webkit/fileapi/sandbox_mount_point_provider.cc @@ -6,6 +6,7 @@ #include "base/bind.h" #include "base/command_line.h" +#include "base/file_util.h" #include "base/logging.h" #include "base/memory/scoped_ptr.h" #include "base/metrics/histogram.h" diff --git a/webkit/plugins/ppapi/quota_file_io_unittest.cc b/webkit/plugins/ppapi/quota_file_io_unittest.cc index e5e38d5..1a1df1c 100644 --- a/webkit/plugins/ppapi/quota_file_io_unittest.cc +++ b/webkit/plugins/ppapi/quota_file_io_unittest.cc @@ -8,6 +8,7 @@ #include "base/basictypes.h" #include "base/bind.h" +#include "base/file_util.h" #include "base/files/scoped_temp_dir.h" #include "base/memory/weak_ptr.h" #include "base/message_loop.h" |