iwyu: Cleanup in the following files:
* at_exit.cc
* atomicops.h
* base_paths.h
* bzip2_error_handler.cc
* callback_internal.h
* command_line.cc
* cpu.cc
* environment.h
* event_recorder.cc
* file_descriptor_shuffle.cc
* file_path.cc

BUG=none
TEST=none

Review URL: http://codereview.chromium.org/6759017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80340 0039d316-1c4b-4281-b951-d872f2087c98


CrOS-Libchrome-Original-Commit: 2edc286744f23ada9325f8e8fb4c8967a20842e9
diff --git a/base/at_exit.cc b/base/at_exit.cc
index e6618a0..e467c5d 100644
--- a/base/at_exit.cc
+++ b/base/at_exit.cc
@@ -1,8 +1,12 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
 #include "base/at_exit.h"
+
+#include <stddef.h>
+#include <ostream>
+
 #include "base/logging.h"
 
 namespace base {
diff --git a/base/atomicops.h b/base/atomicops.h
index 445696b..1f656e7 100644
--- a/base/atomicops.h
+++ b/base/atomicops.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -30,7 +30,7 @@
 #pragma once
 
 #include "base/basictypes.h"
-#include "base/port.h"
+#include "build/build_config.h"
 
 namespace base {
 namespace subtle {
diff --git a/base/atomicops_unittest.cc b/base/atomicops_unittest.cc
index 5053b0b..d73a098 100644
--- a/base/atomicops_unittest.cc
+++ b/base/atomicops_unittest.cc
@@ -1,8 +1,12 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
 #include "base/atomicops.h"
+
+#include <string.h>
+
+#include "base/port.h"
 #include "testing/gtest/include/gtest/gtest.h"
 
 template <class AtomicType>
diff --git a/base/base_paths.h b/base/base_paths.h
index 72cff15..3c3c8ed 100644
--- a/base/base_paths.h
+++ b/base/base_paths.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -9,7 +9,8 @@
 // This file declares path keys for the base module.  These can be used with
 // the PathService to access various special directories and files.
 
-#include "base/basictypes.h"
+#include "build/build_config.h"
+
 #if defined(OS_WIN)
 #include "base/base_paths_win.h"
 #elif defined(OS_MACOSX)
diff --git a/base/base_paths_linux.cc b/base/base_paths_linux.cc
index c32bc19..2ee690d 100644
--- a/base/base_paths_linux.cc
+++ b/base/base_paths_linux.cc
@@ -4,21 +4,23 @@
 
 #include "base/base_paths.h"
 
-#include <unistd.h>
-#if defined(OS_FREEBSD)
-#include <sys/param.h>
-#include <sys/sysctl.h>
-#endif
+#include <ostream>
+#include <string>
 
+#include "build/build_config.h"
 #include "base/environment.h"
 #include "base/file_path.h"
 #include "base/file_util.h"
 #include "base/logging.h"
 #include "base/memory/scoped_ptr.h"
 #include "base/path_service.h"
-#include "base/sys_string_conversions.h"
 #include "base/nix/xdg_util.h"
 
+#if defined(OS_FREEBSD)
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#endif
+
 namespace base {
 
 #if defined(OS_LINUX)
diff --git a/base/bzip2_error_handler.cc b/base/bzip2_error_handler.cc
index 564cabd..e66bcf3 100644
--- a/base/bzip2_error_handler.cc
+++ b/base/bzip2_error_handler.cc
@@ -1,7 +1,9 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <ostream>
+
 #include "base/logging.h"
 
 // We define BZ_NO_STDIO in third_party/bzip2 to remove its internal STDERR
diff --git a/base/callback_internal.h b/base/callback_internal.h
index c6c70cf..b83b049 100644
--- a/base/callback_internal.h
+++ b/base/callback_internal.h
@@ -9,6 +9,8 @@
 #define BASE_CALLBACK_INTERNAL_H_
 #pragma once
 
+#include <stddef.h>
+
 #include "base/base_api.h"
 #include "base/memory/ref_counted.h"
 
diff --git a/base/command_line.cc b/base/command_line.cc
index c5fd620..b027d2a 100644
--- a/base/command_line.cc
+++ b/base/command_line.cc
@@ -5,24 +5,19 @@
 #include "base/command_line.h"
 
 #include <algorithm>
+#include <ostream>
 
+#include "base/basictypes.h"
 #include "base/file_path.h"
-#include "base/file_util.h"
 #include "base/logging.h"
-#include "base/memory/singleton.h"
 #include "base/string_split.h"
 #include "base/string_util.h"
-#include "base/sys_string_conversions.h"
 #include "base/utf_string_conversions.h"
 #include "build/build_config.h"
 
 #if defined(OS_WIN)
 #include <windows.h>
 #include <shellapi.h>
-#elif defined(OS_POSIX)
-#include <limits.h>
-#include <stdlib.h>
-#include <unistd.h>
 #endif
 
 CommandLine* CommandLine::current_process_commandline_ = NULL;
diff --git a/base/command_line.h b/base/command_line.h
index 5af9742..970e4a7 100644
--- a/base/command_line.h
+++ b/base/command_line.h
@@ -15,12 +15,12 @@
 #define BASE_COMMAND_LINE_H_
 #pragma once
 
+#include <stddef.h>
 #include <map>
 #include <string>
 #include <vector>
 
 #include "base/base_api.h"
-#include "base/basictypes.h"
 #include "build/build_config.h"
 
 class FilePath;
diff --git a/base/cpu.cc b/base/cpu.cc
index 3232f15..f45e966 100644
--- a/base/cpu.cc
+++ b/base/cpu.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
@@ -120,6 +120,4 @@
 #endif
 }
 
-
-
 }  // namespace base
diff --git a/base/environment.h b/base/environment.h
index ebad820..cf71724 100644
--- a/base/environment.h
+++ b/base/environment.h
@@ -9,7 +9,7 @@
 #include <string>
 
 #include "base/base_api.h"
-#include "base/basictypes.h"
+#include "build/build_config.h"
 
 namespace base {
 
diff --git a/base/event_recorder.cc b/base/event_recorder.cc
index 1119b4f..b247380 100644
--- a/base/event_recorder.cc
+++ b/base/event_recorder.cc
@@ -1,9 +1,8 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include "build/build_config.h"
-
+#include <stddef.h>
 #include <windows.h>
 #include <mmsystem.h>
 
diff --git a/base/event_recorder.h b/base/event_recorder.h
index 21e2922..1f7aa61 100644
--- a/base/event_recorder.h
+++ b/base/event_recorder.h
@@ -6,13 +6,15 @@
 #define BASE_EVENT_RECORDER_H_
 #pragma once
 
-#if defined(OS_WIN)
-#include <windows.h>
-#include <stdio.h>
-#endif
-
 #include "base/base_api.h"
 #include "base/basictypes.h"
+#include "build/build_config.h"
+
+#if defined(OS_WIN)
+#include <stdio.h>
+#include <string.h>
+#include <windows.h>
+#endif
 
 class FilePath;
 
diff --git a/base/file_descriptor_shuffle.cc b/base/file_descriptor_shuffle.cc
index 2bb156b..7ad9787 100644
--- a/base/file_descriptor_shuffle.cc
+++ b/base/file_descriptor_shuffle.cc
@@ -1,11 +1,12 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
 #include "base/file_descriptor_shuffle.h"
 
-#include <errno.h>
 #include <unistd.h>
+#include <stddef.h>
+#include <ostream>
 
 #include "base/eintr_wrapper.h"
 #include "base/logging.h"
diff --git a/base/file_path.cc b/base/file_path.cc
index bf3eee8..0d0b40b 100644
--- a/base/file_path.cc
+++ b/base/file_path.cc
@@ -2,16 +2,12 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
-#include <algorithm>
-
 #include "base/file_path.h"
 
-#if defined(OS_WIN)
-#include <windows.h>
-#elif defined(OS_MACOSX)
-#include <CoreFoundation/CoreFoundation.h>
-#endif
+#include <string.h>
+#include <algorithm>
 
+#include "base/basictypes.h"
 #include "base/logging.h"
 #include "base/pickle.h"
 
@@ -27,6 +23,12 @@
 #include "base/third_party/icu/icu_utf.h"
 #endif
 
+#if defined(OS_WIN)
+#include <windows.h>
+#elif defined(OS_MACOSX)
+#include <CoreFoundation/CoreFoundation.h>
+#endif
+
 #if defined(FILE_PATH_USES_WIN_SEPARATORS)
 const FilePath::CharType FilePath::kSeparators[] = FILE_PATH_LITERAL("\\/");
 #else  // FILE_PATH_USES_WIN_SEPARATORS
diff --git a/base/file_path.h b/base/file_path.h
index 8ec66a2..fd9260c 100644
--- a/base/file_path.h
+++ b/base/file_path.h
@@ -100,14 +100,16 @@
 #define BASE_FILE_PATH_H_
 #pragma once
 
+#include <stddef.h>
 #include <string>
 #include <vector>
 
 #include "base/base_api.h"
-#include "base/basictypes.h"
 #include "base/compiler_specific.h"
 #include "base/hash_tables.h"
+#include "base/string16.h"
 #include "base/string_piece.h"  // For implicit conversions.
+#include "build/build_config.h"
 
 // Windows-style drive letter support and pathname separator characters can be
 // enabled and disabled independently, to aid testing.  These #defines are
@@ -386,7 +388,7 @@
 
 template<>
 struct hash<FilePath> {
-  std::size_t operator()(const FilePath& f) const {
+  size_t operator()(const FilePath& f) const {
     return hash<FilePath::StringType>()(f.value());
   }
 };