diff options
author | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-14 05:29:02 +0000 |
---|---|---|
committer | thestig@chromium.org <thestig@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-05-14 05:29:02 +0000 |
commit | e6fec476d1915b206f9c8a7948379a5140669be4 (patch) | |
tree | 57bbf6d43170d6e6d7c0d3fe6aeecb616a6c3acd | |
parent | 0e196717837d7a00e29d0597a42226f27741286e (diff) | |
download | chromium_src-e6fec476d1915b206f9c8a7948379a5140669be4.zip chromium_src-e6fec476d1915b206f9c8a7948379a5140669be4.tar.gz chromium_src-e6fec476d1915b206f9c8a7948379a5140669be4.tar.bz2 |
Cleanup: Remove unneeded base/file_util.h includes in content.
Review URL: https://chromiumcodereview.appspot.com/14606009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199918 0039d316-1c4b-4281-b951-d872f2087c98
28 files changed, 23 insertions, 40 deletions
diff --git a/content/app/android/library_loader_hooks.cc b/content/app/android/library_loader_hooks.cc index 3d0cb9c..beaf6bf 100644 --- a/content/app/android/library_loader_hooks.cc +++ b/content/app/android/library_loader_hooks.cc @@ -12,7 +12,6 @@ #include "base/base_switches.h" #include "base/command_line.h" #include "base/debug/trace_event.h" -#include "base/file_util.h" #include "base/files/file_path.h" #include "base/logging.h" #include "base/string_util.h" diff --git a/content/browser/android/tracing_intent_handler.cc b/content/browser/android/tracing_intent_handler.cc index f26f5b3..2760916 100644 --- a/content/browser/android/tracing_intent_handler.cc +++ b/content/browser/android/tracing_intent_handler.cc @@ -6,6 +6,7 @@ #include "base/android/jni_android.h" #include "base/android/jni_string.h" +#include "base/files/file_path.h" #include "base/logging.h" #include "content/public/browser/trace_controller.h" #include "jni/TracingIntentHandler_jni.h" diff --git a/content/browser/android/tracing_intent_handler.h b/content/browser/android/tracing_intent_handler.h index f916300..787f854 100644 --- a/content/browser/android/tracing_intent_handler.h +++ b/content/browser/android/tracing_intent_handler.h @@ -2,13 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_BROWSER_ANDROID_TRACING_INTENT_HANDLER_H -#define CONTENT_BROWSER_ANDROID_TRACING_INTENT_HANDLER_H +#ifndef CONTENT_BROWSER_ANDROID_TRACING_INTENT_HANDLER_H_ +#define CONTENT_BROWSER_ANDROID_TRACING_INTENT_HANDLER_H_ #include <jni.h> #include <string> -#include "base/file_util.h" #include "content/browser/tracing/trace_subscriber_stdio.h" namespace content { @@ -29,4 +28,4 @@ class TracingIntentHandler : public TraceSubscriberStdio { }; } // namespace content -#endif // CONTENT_BROWSER_ANDROID_TRACING_INTENT_HANDLER_H +#endif // CONTENT_BROWSER_ANDROID_TRACING_INTENT_HANDLER_H_ diff --git a/content/browser/appcache/chrome_appcache_service.cc b/content/browser/appcache/chrome_appcache_service.cc index 97a821d..bcc37a3 100644 --- a/content/browser/appcache/chrome_appcache_service.cc +++ b/content/browser/appcache/chrome_appcache_service.cc @@ -4,7 +4,6 @@ #include "content/browser/appcache/chrome_appcache_service.h" -#include "base/file_util.h" #include "base/files/file_path.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/content_browser_client.h" diff --git a/content/browser/download/download_manager_impl_unittest.cc b/content/browser/download/download_manager_impl_unittest.cc index 2abb8f9..b1e1c04 100644 --- a/content/browser/download/download_manager_impl_unittest.cc +++ b/content/browser/download/download_manager_impl_unittest.cc @@ -6,7 +6,6 @@ #include <string> #include "base/bind.h" -#include "base/file_util.h" #include "base/files/scoped_temp_dir.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" @@ -64,7 +63,7 @@ MATCHER_P2(DownloadCreateInfoWithDefaultPath, info, download_directory, "") { class MockDownloadItemImpl : public DownloadItemImpl { public: // Use history constructor for minimal base object. - MockDownloadItemImpl(DownloadItemImplDelegate* delegate) + explicit MockDownloadItemImpl(DownloadItemImplDelegate* delegate) : DownloadItemImpl( delegate, content::DownloadId(), @@ -426,7 +425,7 @@ class MockDownloadManagerObserver : public DownloadManager::Observer { DownloadManager*, int32)); }; -} // namespace +} // namespace class DownloadManagerTest : public testing::Test { public: diff --git a/content/browser/download/drag_download_file.cc b/content/browser/download/drag_download_file.cc index 5bbc9cb..3022ebd 100644 --- a/content/browser/download/drag_download_file.cc +++ b/content/browser/download/drag_download_file.cc @@ -5,7 +5,6 @@ #include "content/browser/download/drag_download_file.h" #include "base/bind.h" -#include "base/file_util.h" #include "base/message_loop.h" #include "content/browser/download/download_stats.h" #include "content/browser/web_contents/web_contents_impl.h" @@ -68,7 +67,7 @@ class DragDownloadFile::DragDownloadFileUI : public DownloadItem::Observer { params->set_callback(base::Bind(&DragDownloadFileUI::OnDownloadStarted, weak_ptr_factory_.GetWeakPtr())); params->set_file_path(file_path); - params->set_file_stream(file_stream.Pass()); // Nulls file_stream. + params->set_file_stream(file_stream.Pass()); // Nulls file_stream. download_manager->DownloadUrl(params.Pass()); } diff --git a/content/browser/download/drag_download_file_browsertest.cc b/content/browser/download/drag_download_file_browsertest.cc index ebbec59..7242c84 100644 --- a/content/browser/download/drag_download_file_browsertest.cc +++ b/content/browser/download/drag_download_file_browsertest.cc @@ -2,7 +2,6 @@ // 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 "content/browser/download/download_file_factory.h" diff --git a/content/browser/download/save_item.cc b/content/browser/download/save_item.cc index 450d383..bf4d3de 100644 --- a/content/browser/download/save_item.cc +++ b/content/browser/download/save_item.cc @@ -4,7 +4,6 @@ #include "content/browser/download/save_item.h" -#include "base/file_util.h" #include "base/logging.h" #include "base/string_util.h" #include "content/browser/download/save_file.h" @@ -122,12 +121,12 @@ void SaveItem::Rename(const base::FilePath& full_path) { } void SaveItem::SetSaveId(int32 save_id) { - DCHECK(save_id_ == -1); + DCHECK_EQ(-1, save_id_); save_id_ = save_id; } void SaveItem::SetTotalBytes(int64 total_bytes) { - DCHECK(total_bytes_ == 0); + DCHECK_EQ(0, total_bytes_); total_bytes_ = total_bytes; } diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc index 7b29ea4..89aa36b 100644 --- a/content/browser/gpu/gpu_data_manager_impl.cc +++ b/content/browser/gpu/gpu_data_manager_impl.cc @@ -12,7 +12,6 @@ #include "base/bind_helpers.h" #include "base/command_line.h" #include "base/debug/trace_event.h" -#include "base/file_util.h" #include "base/metrics/field_trial.h" #include "base/metrics/histogram.h" #include "base/stringprintf.h" diff --git a/content/browser/indexed_db/indexed_db_quota_client.cc b/content/browser/indexed_db/indexed_db_quota_client.cc index 91b5af1..56635e3 100644 --- a/content/browser/indexed_db/indexed_db_quota_client.cc +++ b/content/browser/indexed_db/indexed_db_quota_client.cc @@ -6,7 +6,6 @@ #include <vector> -#include "base/file_util.h" #include "base/logging.h" #include "base/message_loop_proxy.h" #include "content/browser/indexed_db/indexed_db_context_impl.h" diff --git a/content/browser/loader/redirect_to_file_resource_handler.cc b/content/browser/loader/redirect_to_file_resource_handler.cc index 4ab04ea..b82438b 100644 --- a/content/browser/loader/redirect_to_file_resource_handler.cc +++ b/content/browser/loader/redirect_to_file_resource_handler.cc @@ -5,7 +5,6 @@ #include "content/browser/loader/redirect_to_file_resource_handler.h" #include "base/bind.h" -#include "base/file_util.h" #include "base/files/file_util_proxy.h" #include "base/logging.h" #include "base/message_loop_proxy.h" diff --git a/content/browser/plugin_process_host.cc b/content/browser/plugin_process_host.cc index cad8d18..cce088f 100644 --- a/content/browser/plugin_process_host.cc +++ b/content/browser/plugin_process_host.cc @@ -15,7 +15,6 @@ #include "base/base_switches.h" #include "base/bind.h" #include "base/command_line.h" -#include "base/file_util.h" #include "base/files/file_path.h" #include "base/logging.h" #include "base/metrics/histogram.h" diff --git a/content/browser/renderer_host/pepper/pepper_message_filter.cc b/content/browser/renderer_host/pepper/pepper_message_filter.cc index 95fe84d..03a6534 100644 --- a/content/browser/renderer_host/pepper/pepper_message_filter.cc +++ b/content/browser/renderer_host/pepper/pepper_message_filter.cc @@ -8,7 +8,6 @@ #include "base/bind_helpers.h" #include "base/callback.h" #include "base/compiler_specific.h" -#include "base/file_util.h" #include "base/files/file_path.h" #include "base/logging.h" #include "base/memory/ref_counted.h" diff --git a/content/browser/renderer_host/render_message_filter.cc b/content/browser/renderer_host/render_message_filter.cc index 9bea24c..3b4031b 100644 --- a/content/browser/renderer_host/render_message_filter.cc +++ b/content/browser/renderer_host/render_message_filter.cc @@ -10,7 +10,6 @@ #include "base/bind_helpers.h" #include "base/command_line.h" #include "base/debug/alias.h" -#include "base/file_util.h" #include "base/process_util.h" #include "base/strings/sys_string_conversions.h" #include "base/threading/thread.h" @@ -734,7 +733,7 @@ void RenderMessageFilter::OnDidCreateOutOfProcessPepperInstance( // mapping to decide how to handle messages received from the (untrusted) // plugin, so an exploited renderer must not be able to insert fake mappings // that may allow it access to other render processes. - DCHECK(instance_data.render_process_id == 0); + DCHECK_EQ(0, instance_data.render_process_id); instance_data.render_process_id = render_process_id_; if (is_external) { // We provide the BrowserPpapiHost to the embedder, so it's safe to cast. diff --git a/content/browser/renderer_host/render_view_host_manager_browsertest.cc b/content/browser/renderer_host/render_view_host_manager_browsertest.cc index 8bb0454..9000c69 100644 --- a/content/browser/renderer_host/render_view_host_manager_browsertest.cc +++ b/content/browser/renderer_host/render_view_host_manager_browsertest.cc @@ -2,7 +2,6 @@ // 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/json/json_reader.h" #include "base/memory/ref_counted.h" #include "base/path_service.h" @@ -1050,6 +1049,7 @@ class RenderViewHostObserverArray { size_t GetNumObservers() const { return observers_.size(); } + private: friend class RVHObserver; class RVHObserver : public RenderViewHostObserver { diff --git a/content/browser/tracing/trace_subscriber_stdio.cc b/content/browser/tracing/trace_subscriber_stdio.cc index ea3a724..b5f6e82 100644 --- a/content/browser/tracing/trace_subscriber_stdio.cc +++ b/content/browser/tracing/trace_subscriber_stdio.cc @@ -6,6 +6,7 @@ #include "base/bind.h" #include "base/debug/trace_event.h" +#include "base/file_util.h" #include "base/logging.h" #include "base/threading/sequenced_worker_pool.h" #include "content/public/browser/browser_thread.h" diff --git a/content/browser/tracing/trace_subscriber_stdio.h b/content/browser/tracing/trace_subscriber_stdio.h index 9851618..06a70db 100644 --- a/content/browser/tracing/trace_subscriber_stdio.h +++ b/content/browser/tracing/trace_subscriber_stdio.h @@ -8,10 +8,13 @@ #include <string> #include "base/compiler_specific.h" -#include "base/file_util.h" #include "content/public/browser/trace_subscriber.h" #include "content/common/content_export.h" +namespace base { +class FilePath; +} + namespace content { class TraceSubscriberStdioImpl; diff --git a/content/browser/tracing/trace_subscriber_stdio_unittest.cc b/content/browser/tracing/trace_subscriber_stdio_unittest.cc index 90d313f..0b0e7c2 100644 --- a/content/browser/tracing/trace_subscriber_stdio_unittest.cc +++ b/content/browser/tracing/trace_subscriber_stdio_unittest.cc @@ -4,6 +4,7 @@ #include "content/browser/tracing/trace_subscriber_stdio.h" +#include "base/file_util.h" #include "base/files/scoped_temp_dir.h" #include "base/threading/sequenced_worker_pool.h" #include "content/public/browser/browser_thread.h" diff --git a/content/browser/web_contents/navigation_controller_impl.cc b/content/browser/web_contents/navigation_controller_impl.cc index f7c8215..5488c6c 100644 --- a/content/browser/web_contents/navigation_controller_impl.cc +++ b/content/browser/web_contents/navigation_controller_impl.cc @@ -5,7 +5,6 @@ #include "content/browser/web_contents/navigation_controller_impl.h" #include "base/bind.h" -#include "base/file_util.h" #include "base/logging.h" #include "base/string_number_conversions.h" // Temporary #include "base/string_util.h" @@ -145,7 +144,7 @@ const size_t kMaxEntryCountForTestingNotSet = -1; size_t NavigationControllerImpl::max_entry_count_for_testing_ = kMaxEntryCountForTestingNotSet; - // Should Reload check for post data? The default is true, but is set to false +// Should Reload check for post data? The default is true, but is set to false // when testing. static bool g_check_for_repost = true; @@ -948,7 +947,7 @@ bool NavigationControllerImpl::IsRedirect( } void NavigationControllerImpl::RendererDidNavigateToNewPage( - const ViewHostMsg_FrameNavigate_Params& params, bool replace_entry) { + const ViewHostMsg_FrameNavigate_Params& params, bool replace_entry) { NavigationEntryImpl* new_entry; bool update_virtual_url; // Only make a copy of the pending entry if it is appropriate for the new page @@ -1310,7 +1309,7 @@ void NavigationControllerImpl::PruneAllButActiveInternal() { if (!GetEntryCount()) return; - DCHECK(last_committed_entry_index_ >= 0); + DCHECK_GE(last_committed_entry_index_, 0); entries_.erase(entries_.begin(), entries_.begin() + last_committed_entry_index_); entries_.erase(entries_.begin() + 1, entries_.end()); @@ -1488,7 +1487,7 @@ void NavigationControllerImpl::InsertOrReplaceEntry(NavigationEntryImpl* entry, void NavigationControllerImpl::PruneOldestEntryIfFull() { if (entries_.size() >= max_entry_count()) { DCHECK_EQ(max_entry_count(), entries_.size()); - DCHECK(last_committed_entry_index_ > 0); + DCHECK_GT(last_committed_entry_index_, 0); RemoveEntryAtIndex(0); NotifyPrunedEntries(this, true, 1); } diff --git a/content/browser/web_contents/web_drag_source_gtk.cc b/content/browser/web_contents/web_drag_source_gtk.cc index 05af3f5..434a192 100644 --- a/content/browser/web_contents/web_drag_source_gtk.cc +++ b/content/browser/web_contents/web_drag_source_gtk.cc @@ -6,7 +6,6 @@ #include <string> -#include "base/file_util.h" #include "base/nix/mime_util_xdg.h" #include "base/threading/thread_restrictions.h" #include "base/utf_string_conversions.h" diff --git a/content/browser/webui/url_data_manager_backend.cc b/content/browser/webui/url_data_manager_backend.cc index 0a1cb37..ab964d0 100644 --- a/content/browser/webui/url_data_manager_backend.cc +++ b/content/browser/webui/url_data_manager_backend.cc @@ -11,7 +11,6 @@ #include "base/command_line.h" #include "base/compiler_specific.h" #include "base/debug/trace_event.h" -#include "base/file_util.h" #include "base/lazy_instance.h" #include "base/memory/ref_counted.h" #include "base/memory/ref_counted_memory.h" diff --git a/content/common/fileapi/file_system_dispatcher.cc b/content/common/fileapi/file_system_dispatcher.cc index 425b00c..c9726dc 100644 --- a/content/common/fileapi/file_system_dispatcher.cc +++ b/content/common/fileapi/file_system_dispatcher.cc @@ -4,7 +4,6 @@ #include "content/common/fileapi/file_system_dispatcher.h" -#include "base/file_util.h" #include "base/process.h" #include "content/common/child_thread.h" #include "content/common/fileapi/file_system_messages.h" diff --git a/content/common/pepper_plugin_registry.cc b/content/common/pepper_plugin_registry.cc index c2ede0b..1dac381 100644 --- a/content/common/pepper_plugin_registry.cc +++ b/content/common/pepper_plugin_registry.cc @@ -5,7 +5,6 @@ #include "content/common/pepper_plugin_registry.h" #include "base/command_line.h" -#include "base/file_util.h" #include "base/native_library.h" #include "base/string_util.h" #include "base/strings/string_split.h" diff --git a/content/common/sandbox_linux.cc b/content/common/sandbox_linux.cc index c3e842b..523e29d 100644 --- a/content/common/sandbox_linux.cc +++ b/content/common/sandbox_linux.cc @@ -13,7 +13,6 @@ #include "base/bind.h" #include "base/bind_helpers.h" #include "base/command_line.h" -#include "base/file_util.h" #include "base/logging.h" #include "base/memory/singleton.h" #include "base/posix/eintr_wrapper.h" @@ -95,7 +94,7 @@ void LinuxSandbox::PreinitializeSandbox() { // Open proc_fd_ only in Debug mode so that forgetting to close it doesn't // produce a sandbox escape in Release mode. proc_fd_ = open("/proc", O_DIRECTORY | O_RDONLY); - CHECK(proc_fd_ >= 0); + CHECK_GE(proc_fd_, 0); #endif // !defined(NDEBUG) // We "pre-warm" the code that detects supports for seccomp BPF. if (SandboxSeccompBpf::IsSeccompBpfDesired()) { diff --git a/content/renderer/browser_plugin/browser_plugin_browsertest.cc b/content/renderer/browser_plugin/browser_plugin_browsertest.cc index 7b6a373..dbc8523 100644 --- a/content/renderer/browser_plugin/browser_plugin_browsertest.cc +++ b/content/renderer/browser_plugin/browser_plugin_browsertest.cc @@ -4,7 +4,6 @@ #include "content/renderer/browser_plugin/browser_plugin_browsertest.h" -#include "base/file_util.h" #include "base/files/file_path.h" #include "base/memory/singleton.h" #include "base/path_service.h" diff --git a/content/renderer/ico_image_decoder_unittest.cc b/content/renderer/ico_image_decoder_unittest.cc index 3b02874..7e1e01e5 100644 --- a/content/renderer/ico_image_decoder_unittest.cc +++ b/content/renderer/ico_image_decoder_unittest.cc @@ -2,7 +2,6 @@ // 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 "content/test/image_decoder_test.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebImageDecoder.h" diff --git a/content/renderer/renderer_webkitplatformsupport_impl.cc b/content/renderer/renderer_webkitplatformsupport_impl.cc index 47c4fa1..12dfa0a 100644 --- a/content/renderer/renderer_webkitplatformsupport_impl.cc +++ b/content/renderer/renderer_webkitplatformsupport_impl.cc @@ -5,7 +5,6 @@ #include "content/renderer/renderer_webkitplatformsupport_impl.h" #include "base/command_line.h" -#include "base/file_util.h" #include "base/files/file_path.h" #include "base/lazy_instance.h" #include "base/metrics/histogram.h" diff --git a/content/shell/android/browsertests_apk/content_browser_tests_android.cc b/content/shell/android/browsertests_apk/content_browser_tests_android.cc index 99c6171..96ce15c 100644 --- a/content/shell/android/browsertests_apk/content_browser_tests_android.cc +++ b/content/shell/android/browsertests_apk/content_browser_tests_android.cc @@ -6,6 +6,7 @@ // inside an android application. #include <android/log.h> +#include <unistd.h> #include "base/android/base_jni_registrar.h" #include "base/android/jni_android.h" @@ -13,7 +14,6 @@ #include "base/android/scoped_java_ref.h" #include "base/base_switches.h" #include "base/command_line.h" -#include "base/file_util.h" #include "base/files/file_path.h" #include "base/logging.h" #include "base/string_util.h" @@ -53,7 +53,6 @@ static void RunTests(JNIEnv* env, jobject obj, jstring jfiles_dir, jobject app_context) { - // Command line basic initialization, will be fully initialized later. static const char* const kInitialArgv[] = { "ContentBrowserTestsActivity" }; CommandLine::Init(arraysize(kInitialArgv), kInitialArgv); |