Skip to content

Commit

Permalink
Cleanup: Use base/files/file_util.h instead of base/file_util.h in as…
Browse files Browse the repository at this point in the history
…h/, athena/, and chromeos/

TBR=pneubeck@chromium.org

Review URL: https://codereview.chromium.org/555313002

Cr-Commit-Position: refs/heads/master@{#294072}
  • Loading branch information
leizleiz authored and Commit bot committed Sep 10, 2014
1 parent 4dd3ef0 commit b44bd35
Show file tree
Hide file tree
Showing 18 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion ash/desktop_background/desktop_background_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "ash/wm/root_window_layout_manager.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/synchronization/cancellation_flag.h"
#include "base/threading/worker_pool.h"
Expand Down
4 changes: 2 additions & 2 deletions athena/main/athena_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "athena/main/public/athena_launcher.h"
#include "athena/screen/public/screen_manager.h"
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/files/file_util.h"
#include "base/path_service.h"
#include "components/pdf/renderer/ppb_pdf_impl.h"
#include "content/public/app/content_main.h"
Expand All @@ -38,7 +38,7 @@ namespace {
const char kDefaultAppPath[] =
"chrome/common/extensions/docs/examples/apps/calculator/app";

} // namespace athena
} // namespace

class AthenaDesktopController : public extensions::DesktopController {
public:
Expand Down
2 changes: 1 addition & 1 deletion athena/system/orientation_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include "athena/screen/public/screen_manager.h"
#include "athena/system/orientation_controller.h"
#include "base/bind.h"
#include "base/file_util.h"
#include "base/files/file_path_watcher.h"
#include "base/files/file_util.h"
#include "base/message_loop/message_loop.h"
#include "base/task_runner.h"

Expand Down
2 changes: 1 addition & 1 deletion chromeos/accelerometer/accelerometer_reader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "chromeos/accelerometer/accelerometer_reader.h"

#include "base/bind.h"
#include "base/file_util.h"
#include "base/files/file_util.h"
#include "base/location.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/string_number_conversions.h"
Expand Down
2 changes: 1 addition & 1 deletion chromeos/cert_loader_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "chromeos/cert_loader.h"

#include "base/bind.h"
#include "base/file_util.h"
#include "base/files/file_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
Expand Down
2 changes: 1 addition & 1 deletion chromeos/chromeos_paths.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

#include "chromeos/chromeos_paths.h"

#include "base/file_util.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/path_service.h"
#include "base/sys_info.h"

Expand Down
2 changes: 1 addition & 1 deletion chromeos/chromeos_test_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

#include "chromeos/chromeos_test_utils.h"

#include "base/file_util.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/path_service.h"

namespace chromeos {
Expand Down
2 changes: 1 addition & 1 deletion chromeos/dbus/cros_disks_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include <map>

#include "base/bind.h"
#include "base/file_util.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/location.h"
#include "base/message_loop/message_loop_proxy.h"
#include "base/stl_util.h"
Expand Down
2 changes: 1 addition & 1 deletion chromeos/dbus/fake_cryptohome_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "chromeos/dbus/fake_cryptohome_client.h"

#include "base/bind.h"
#include "base/file_util.h"
#include "base/files/file_util.h"
#include "base/location.h"
#include "base/message_loop/message_loop.h"
#include "base/path_service.h"
Expand Down
2 changes: 1 addition & 1 deletion chromeos/dbus/session_manager_client.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#include "base/bind.h"
#include "base/callback.h"
#include "base/file_util.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/location.h"
#include "base/path_service.h"
#include "base/strings/string_number_conversions.h"
Expand Down
2 changes: 1 addition & 1 deletion chromeos/network/client_cert_resolver_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#include <cert.h>
#include <pk11pub.h>

#include "base/file_util.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/json/json_reader.h"
#include "base/run_loop.h"
#include "base/strings/stringprintf.h"
Expand Down
2 changes: 1 addition & 1 deletion chromeos/network/network_cert_migrator_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

#include <cert.h>

#include "base/file_util.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "chromeos/cert_loader.h"
Expand Down
2 changes: 1 addition & 1 deletion chromeos/network/network_connection_handler_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "base/bind.h"
#include "base/callback.h"
#include "base/file_util.h"
#include "base/files/file_util.h"
#include "base/json/json_reader.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop/message_loop.h"
Expand Down
2 changes: 1 addition & 1 deletion chromeos/network/onc/onc_test_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

#include "chromeos/network/onc/onc_test_utils.h"

#include "base/file_util.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/json/json_file_value_serializer.h"
#include "base/logging.h"
#include "base/path_service.h"
Expand Down
8 changes: 4 additions & 4 deletions chromeos/process_proxy/process_output_watcher_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include "base/bind.h"
#include "base/callback.h"
#include "base/file_util.h"
#include "base/files/file_util.h"
#include "base/message_loop/message_loop.h"
#include "base/posix/eintr_wrapper.h"
#include "base/run_loop.h"
Expand Down Expand Up @@ -191,7 +191,7 @@ TEST_F(ProcessOutputWatcherTest, DISABLED_OutputWatcher) {
test_cases.push_back(TestCase("testing error2\n", false));

RunTest(test_cases);
};
}

// http://crbug.com/396496
TEST_F(ProcessOutputWatcherTest, DISABLED_SplitUTF8Character) {
Expand Down Expand Up @@ -299,7 +299,7 @@ TEST_F(ProcessOutputWatcherTest, DISABLED_FourByteUTF8) {
test_cases.push_back(TestCase("\xa2", false, "\xf0\xa4\xad\xa2"));

RunTest(test_cases);
};
}

// Verifies that sending '\0' generates PROCESS_OUTPUT_TYPE_OUT event and does
// not terminate output watcher.
Expand All @@ -313,6 +313,6 @@ TEST_F(ProcessOutputWatcherTest, DISABLED_SendNull) {
test_cases.push_back(TestCase("a", true));

RunTest(test_cases);
};
}

} // namespace chromeos
4 changes: 2 additions & 2 deletions chromeos/process_proxy/process_proxy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include "base/bind.h"
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/posix/eintr_wrapper.h"
#include "base/process/kill.h"
Expand Down Expand Up @@ -43,7 +43,7 @@ ProcessProxy::ProcessProxy(): process_launched_(false),
// Set pipes to initial, invalid value so we can easily know if a pipe was
// opened by us.
ClearAllFdPairs();
};
}

bool ProcessProxy::Open(const std::string& command, pid_t* pid) {
if (process_launched_)
Expand Down
2 changes: 1 addition & 1 deletion chromeos/settings/timezone_settings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include <string>

#include "base/bind.h"
#include "base/file_util.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
Expand Down
10 changes: 5 additions & 5 deletions chromeos/system/name_value_pairs_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#include "chromeos/system/name_value_pairs_parser.h"

#include "base/command_line.h"
#include "base/file_util.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/logging.h"
#include "base/process/launch.h"
#include "base/stl_util.h"
Expand All @@ -19,7 +19,7 @@ namespace system {

namespace {

bool GetToolOutput(int argc, const char* argv[], std::string& output) {
bool GetToolOutput(int argc, const char* argv[], std::string* output) {
DCHECK_GE(argc, 1);

if (!base::PathExists(base::FilePath(argv[0]))) {
Expand All @@ -30,7 +30,7 @@ bool GetToolOutput(int argc, const char* argv[], std::string& output) {
std::vector<std::string> args;
for (int argn = 0; argn < argc; ++argn)
args.push_back(argv[argn]);
if (!base::GetAppOutput(args, &output)) {
if (!base::GetAppOutput(args, output)) {
LOG(WARNING) << "Error executing " << argv[0];
return false;
}
Expand Down Expand Up @@ -109,7 +109,7 @@ bool NameValuePairsParser::GetSingleValueFromTool(int argc,
const char* argv[],
const std::string& key) {
std::string output_string;
if (!GetToolOutput(argc, argv, output_string))
if (!GetToolOutput(argc, argv, &output_string))
return false;

base::TrimWhitespaceASCII(output_string, base::TRIM_ALL, &output_string);
Expand Down Expand Up @@ -138,7 +138,7 @@ bool NameValuePairsParser::ParseNameValuePairsFromTool(
const std::string& delim,
const std::string& comment_delim) {
std::string output_string;
if (!GetToolOutput(argc, argv, output_string))
if (!GetToolOutput(argc, argv, &output_string))
return false;

return ParseNameValuePairsWithComments(
Expand Down

0 comments on commit b44bd35

Please sign in to comment.