summaryrefslogtreecommitdiffstats
path: root/net/tools
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-08 20:40:15 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-08 20:40:15 +0000
commit6cdfd7f74ebadbe6fd2f557039b8b94242dd714e (patch)
tree39125d76f2a25515427dd53a81265d73bbb8ed18 /net/tools
parent81aee95aa6bcb433e4bc26212ea3341edf839bdb (diff)
downloadchromium_src-6cdfd7f74ebadbe6fd2f557039b8b94242dd714e.zip
chromium_src-6cdfd7f74ebadbe6fd2f557039b8b94242dd714e.tar.gz
chromium_src-6cdfd7f74ebadbe6fd2f557039b8b94242dd714e.tar.bz2
Replace FilePath with base::FilePath in net.
Review URL: https://codereview.chromium.org/12218081 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181543 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/tools')
-rw-r--r--net/tools/crash_cache/crash_cache.cc22
-rw-r--r--net/tools/crl_set_dump/crl_set_dump.cc8
-rw-r--r--net/tools/dns_fuzz_stub/dns_fuzz_stub.cc2
-rw-r--r--net/tools/dump_cache/cache_dumper.cc12
-rw-r--r--net/tools/dump_cache/cache_dumper.h6
-rw-r--r--net/tools/dump_cache/dump_cache.cc7
-rw-r--r--net/tools/dump_cache/dump_files.cc33
-rw-r--r--net/tools/dump_cache/dump_files.h6
-rw-r--r--net/tools/dump_cache/simple_cache_dumper.cc3
-rw-r--r--net/tools/dump_cache/simple_cache_dumper.h6
-rw-r--r--net/tools/dump_cache/upgrade_win.cc12
-rw-r--r--net/tools/dump_cache/upgrade_win.h4
-rw-r--r--net/tools/testserver/run_testserver.cc2
-rw-r--r--net/tools/tld_cleanup/tld_cleanup.cc12
14 files changed, 69 insertions, 66 deletions
diff --git a/net/tools/crash_cache/crash_cache.cc b/net/tools/crash_cache/crash_cache.cc
index d616446..39f9d10 100644
--- a/net/tools/crash_cache/crash_cache.cc
+++ b/net/tools/crash_cache/crash_cache.cc
@@ -42,7 +42,7 @@ using disk_cache::RankCrashes;
// Starts a new process, to generate the files.
int RunSlave(RankCrashes action) {
- FilePath exe;
+ base::FilePath exe;
PathService::Get(base::FILE_EXE, &exe);
CommandLine cmdline(exe);
@@ -86,8 +86,8 @@ NET_EXPORT_PRIVATE extern RankCrashes g_rankings_crash;
const char* kCrashEntryName = "the first key";
// Creates the destinaton folder for this run, and returns it on full_path.
-bool CreateTargetFolder(const FilePath& path, RankCrashes action,
- FilePath* full_path) {
+bool CreateTargetFolder(const base::FilePath& path, RankCrashes action,
+ base::FilePath* full_path) {
const char* folders[] = {
"",
"insert_empty1",
@@ -133,7 +133,7 @@ void FlushQueue(disk_cache::Backend* cache) {
cb.GetResult(rv); // Ignore the result;
}
-bool CreateCache(const FilePath& path,
+bool CreateCache(const base::FilePath& path,
base::Thread* thread,
disk_cache::Backend** cache,
net::TestCompletionCallback* cb) {
@@ -146,7 +146,7 @@ bool CreateCache(const FilePath& path,
}
// Generates the files for an empty and one item cache.
-int SimpleInsert(const FilePath& path, RankCrashes action,
+int SimpleInsert(const base::FilePath& path, RankCrashes action,
base::Thread* cache_thread) {
net::TestCompletionCallback cb;
disk_cache::Backend* cache;
@@ -180,7 +180,7 @@ int SimpleInsert(const FilePath& path, RankCrashes action,
}
// Generates the files for a one item cache, and removing the head.
-int SimpleRemove(const FilePath& path, RankCrashes action,
+int SimpleRemove(const base::FilePath& path, RankCrashes action,
base::Thread* cache_thread) {
DCHECK(action >= disk_cache::REMOVE_ONE_1);
DCHECK(action <= disk_cache::REMOVE_TAIL_3);
@@ -219,7 +219,7 @@ int SimpleRemove(const FilePath& path, RankCrashes action,
return NOT_REACHED;
}
-int HeadRemove(const FilePath& path, RankCrashes action,
+int HeadRemove(const base::FilePath& path, RankCrashes action,
base::Thread* cache_thread) {
DCHECK(action >= disk_cache::REMOVE_HEAD_1);
DCHECK(action <= disk_cache::REMOVE_HEAD_4);
@@ -256,7 +256,7 @@ int HeadRemove(const FilePath& path, RankCrashes action,
}
// Generates the files for insertion and removals on heavy loaded caches.
-int LoadOperations(const FilePath& path, RankCrashes action,
+int LoadOperations(const base::FilePath& path, RankCrashes action,
base::Thread* cache_thread) {
DCHECK(action >= disk_cache::INSERT_LOAD_1);
@@ -315,10 +315,10 @@ int LoadOperations(const FilePath& path, RankCrashes action,
}
// Main function on the child process.
-int SlaveCode(const FilePath& path, RankCrashes action) {
+int SlaveCode(const base::FilePath& path, RankCrashes action) {
MessageLoopForIO message_loop;
- FilePath full_path;
+ base::FilePath full_path;
if (!CreateTargetFolder(path, action, &full_path)) {
printf("Destination folder found, please remove it.\n");
return CRASH_OVERWRITE;
@@ -366,7 +366,7 @@ int main(int argc, const char* argv[]) {
return INVALID_ARGUMENT;
}
- FilePath path;
+ base::FilePath path;
PathService::Get(base::DIR_SOURCE_ROOT, &path);
path = path.AppendASCII("net");
path = path.AppendASCII("data");
diff --git a/net/tools/crl_set_dump/crl_set_dump.cc b/net/tools/crl_set_dump/crl_set_dump.cc
index 9ecf199..c13940c 100644
--- a/net/tools/crl_set_dump/crl_set_dump.cc
+++ b/net/tools/crl_set_dump/crl_set_dump.cc
@@ -26,16 +26,16 @@ static int Usage(const char* argv0) {
int main(int argc, char** argv) {
base::AtExitManager at_exit_manager;
- FilePath crl_set_filename, delta_filename, output_filename;
+ base::FilePath crl_set_filename, delta_filename, output_filename;
if (argc < 2 || argc > 4)
return Usage(argv[0]);
- crl_set_filename = FilePath::FromUTF8Unsafe(argv[1]);
+ crl_set_filename = base::FilePath::FromUTF8Unsafe(argv[1]);
if (argc >= 3)
- delta_filename = FilePath::FromUTF8Unsafe(argv[2]);
+ delta_filename = base::FilePath::FromUTF8Unsafe(argv[2]);
if (argc >= 4)
- output_filename = FilePath::FromUTF8Unsafe(argv[3]);
+ output_filename = base::FilePath::FromUTF8Unsafe(argv[3]);
std::string crl_set_bytes, delta_bytes;
if (!file_util::ReadFileToString(crl_set_filename, &crl_set_bytes))
diff --git a/net/tools/dns_fuzz_stub/dns_fuzz_stub.cc b/net/tools/dns_fuzz_stub/dns_fuzz_stub.cc
index 9884ded..83e76e3 100644
--- a/net/tools/dns_fuzz_stub/dns_fuzz_stub.cc
+++ b/net/tools/dns_fuzz_stub/dns_fuzz_stub.cc
@@ -50,7 +50,7 @@ bool ReadTestCase(const char* filename,
uint16* id, std::string* qname, uint16* qtype,
std::vector<char>* resp_buf,
bool* crash_test) {
- FilePath filepath = FilePath::FromUTF8Unsafe(filename);
+ base::FilePath filepath = base::FilePath::FromUTF8Unsafe(filename);
std::string json;
if (!file_util::ReadFileToString(filepath, &json)) {
diff --git a/net/tools/dump_cache/cache_dumper.cc b/net/tools/dump_cache/cache_dumper.cc
index 7f2292b..3c71a92 100644
--- a/net/tools/dump_cache/cache_dumper.cc
+++ b/net/tools/dump_cache/cache_dumper.cc
@@ -40,7 +40,7 @@ void CacheDumper::CloseEntry(disk_cache::Entry* entry, base::Time last_used,
// A version of CreateDirectory which supports lengthy filenames.
// Returns true on success, false on failure.
-bool SafeCreateDirectory(const FilePath& path) {
+bool SafeCreateDirectory(const base::FilePath& path) {
#ifdef WIN32_LARGE_FILENAME_SUPPORT
// Due to large paths on windows, it can't simply do a
// CreateDirectory("a/b/c"). Instead, create each subdirectory manually.
@@ -56,7 +56,7 @@ bool SafeCreateDirectory(const FilePath& path) {
// Create the subdirectories individually
while ((pos = path.value().find(backslash, pos)) != std::wstring::npos) {
- FilePath::StringType subdir = path.value().substr(0, pos);
+ base::FilePath::StringType subdir = path.value().substr(0, pos);
CreateDirectoryW(subdir.c_str(), NULL);
// we keep going even if directory creation failed.
pos++;
@@ -68,7 +68,7 @@ bool SafeCreateDirectory(const FilePath& path) {
#endif
}
-DiskDumper::DiskDumper(const FilePath& path)
+DiskDumper::DiskDumper(const base::FilePath& path)
: path_(path), entry_(NULL) {
file_util::CreateDirectory(path);
}
@@ -82,7 +82,7 @@ int DiskDumper::CreateEntry(const std::string& key,
std::string base_path = path_.MaybeAsASCII();
std::string new_path =
net::UrlToFilenameEncoder::Encode(url, base_path, false);
- entry_path_ = FilePath::FromUTF8Unsafe(new_path);
+ entry_path_ = base::FilePath::FromUTF8Unsafe(new_path);
#ifdef WIN32_LARGE_FILENAME_SUPPORT
// In order for long filenames to work, we'll need to prepend
@@ -92,14 +92,14 @@ int DiskDumper::CreateEntry(const std::string& key,
// to convert to a wstring to do this.
std::wstring name = kLongFilenamePrefix;
name.append(entry_path_.value());
- entry_path_ = FilePath(name);
+ entry_path_ = base::FilePath(name);
#endif
entry_url_ = key;
SafeCreateDirectory(entry_path_.DirName());
- FilePath::StringType file = entry_path_.value();
+ base::FilePath::StringType file = entry_path_.value();
#ifdef WIN32_LARGE_FILENAME_SUPPORT
entry_ = CreateFileW(file.c_str(), GENERIC_WRITE|GENERIC_READ, 0, 0,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
diff --git a/net/tools/dump_cache/cache_dumper.h b/net/tools/dump_cache/cache_dumper.h
index daca8fe..261c2b2 100644
--- a/net/tools/dump_cache/cache_dumper.h
+++ b/net/tools/dump_cache/cache_dumper.h
@@ -63,7 +63,7 @@ class CacheDumper : public CacheDumpWriter {
// Writes data to a disk.
class DiskDumper : public CacheDumpWriter {
public:
- explicit DiskDumper(const FilePath& path);
+ explicit DiskDumper(const base::FilePath& path);
virtual int CreateEntry(const std::string& key, disk_cache::Entry** entry,
const net::CompletionCallback& callback) OVERRIDE;
@@ -74,11 +74,11 @@ class DiskDumper : public CacheDumpWriter {
base::Time last_modified) OVERRIDE;
private:
- FilePath path_;
+ base::FilePath path_;
// This is a bit of a hack. As we get a CreateEntry, we coin the current
// entry_path_ where we write that entry to disk. Subsequent calls to
// WriteEntry() utilize this path for writing to disk.
- FilePath entry_path_;
+ base::FilePath entry_path_;
std::string entry_url_;
#ifdef WIN32_LARGE_FILENAME_SUPPORT
HANDLE entry_;
diff --git a/net/tools/dump_cache/dump_cache.cc b/net/tools/dump_cache/dump_cache.cc
index d68469b..f5194ac 100644
--- a/net/tools/dump_cache/dump_cache.cc
+++ b/net/tools/dump_cache/dump_cache.cc
@@ -80,7 +80,8 @@ int LaunchSlave(CommandLine command_line,
bool do_convert_to_text = command_line.HasSwitch(kDumpToFiles);
if (do_upgrade) {
- FilePath program(base::StringPrintf(L"%ls%d", L"dump_cache", version));
+ base::FilePath program(
+ base::StringPrintf(L"%ls%d", L"dump_cache", version));
command_line.SetProgram(program);
}
@@ -108,14 +109,14 @@ int main(int argc, const char* argv[]) {
CommandLine::Init(argc, argv);
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
- FilePath input_path = command_line.GetSwitchValuePath(kInputPath);
+ base::FilePath input_path = command_line.GetSwitchValuePath(kInputPath);
if (input_path.empty())
return Help();
bool dump_to_files = command_line.HasSwitch(kDumpToFiles);
bool upgrade = command_line.HasSwitch(kUpgrade);
- FilePath output_path = command_line.GetSwitchValuePath(kOutputPath);
+ base::FilePath output_path = command_line.GetSwitchValuePath(kOutputPath);
if ((dump_to_files || upgrade) && output_path.empty())
return Help();
diff --git a/net/tools/dump_cache/dump_files.cc b/net/tools/dump_cache/dump_files.cc
index f181e7a..b43ca04 100644
--- a/net/tools/dump_cache/dump_files.cc
+++ b/net/tools/dump_cache/dump_files.cc
@@ -26,10 +26,10 @@
namespace {
-const FilePath::CharType kIndexName[] = FILE_PATH_LITERAL("index");
+const base::FilePath::CharType kIndexName[] = FILE_PATH_LITERAL("index");
// Reads the |header_size| bytes from the beginning of file |name|.
-bool ReadHeader(const FilePath& name, char* header, int header_size) {
+bool ReadHeader(const base::FilePath& name, char* header, int header_size) {
net::FileStream file(NULL);
file.OpenSync(name, base::PLATFORM_FILE_OPEN | base::PLATFORM_FILE_READ);
if (!file.IsOpen()) {
@@ -45,7 +45,7 @@ bool ReadHeader(const FilePath& name, char* header, int header_size) {
return true;
}
-int GetMajorVersionFromFile(const FilePath& name) {
+int GetMajorVersionFromFile(const base::FilePath& name) {
disk_cache::IndexHeader header;
if (!ReadHeader(name, reinterpret_cast<char*>(&header), sizeof(header)))
return 0;
@@ -54,7 +54,7 @@ int GetMajorVersionFromFile(const FilePath& name) {
}
// Dumps the contents of the Stats record.
-void DumpStats(const FilePath& path, disk_cache::CacheAddr addr) {
+void DumpStats(const base::FilePath& path, disk_cache::CacheAddr addr) {
// We need a message loop, although we really don't run any task.
MessageLoop loop(MessageLoop::TYPE_IO);
@@ -92,7 +92,8 @@ void DumpStats(const FilePath& path, disk_cache::CacheAddr addr) {
}
// Dumps the contents of the Index-file header.
-void DumpIndexHeader(const FilePath& name, disk_cache::CacheAddr* stats_addr) {
+void DumpIndexHeader(const base::FilePath& name,
+ disk_cache::CacheAddr* stats_addr) {
disk_cache::IndexHeader header;
if (!ReadHeader(name, reinterpret_cast<char*>(&header), sizeof(header)))
return;
@@ -122,7 +123,7 @@ void DumpIndexHeader(const FilePath& name, disk_cache::CacheAddr* stats_addr) {
}
// Dumps the contents of a block-file header.
-void DumpBlockHeader(const FilePath& name) {
+void DumpBlockHeader(const base::FilePath& name) {
disk_cache::BlockFileHeader header;
if (!ReadHeader(name, reinterpret_cast<char*>(&header), sizeof(header)))
return;
@@ -150,7 +151,7 @@ void DumpBlockHeader(const FilePath& name) {
// Simple class that interacts with the set of cache files.
class CacheDumper {
public:
- explicit CacheDumper(const FilePath& path)
+ explicit CacheDumper(const base::FilePath& path)
: path_(path),
block_files_(path),
index_(NULL),
@@ -170,7 +171,7 @@ class CacheDumper {
disk_cache::RankingsNode* rankings);
private:
- FilePath path_;
+ base::FilePath path_;
disk_cache::BlockFiles block_files_;
scoped_refptr<disk_cache::MappedFile> index_file_;
disk_cache::Index* index_;
@@ -186,7 +187,7 @@ bool CacheDumper::Init() {
return false;
}
- FilePath index_name(path_.Append(kIndexName));
+ base::FilePath index_name(path_.Append(kIndexName));
index_file_ = new disk_cache::MappedFile;
index_ = reinterpret_cast<disk_cache::Index*>(
index_file_->Init(index_name, 0));
@@ -306,14 +307,14 @@ void DumpRankings(const disk_cache::RankingsNode& rankings) {
// -----------------------------------------------------------------------
-int GetMajorVersion(const FilePath& input_path) {
- FilePath index_name(input_path.Append(kIndexName));
+int GetMajorVersion(const base::FilePath& input_path) {
+ base::FilePath index_name(input_path.Append(kIndexName));
int version = GetMajorVersionFromFile(index_name);
if (!version)
return 0;
- FilePath data_name(input_path.Append(FILE_PATH_LITERAL("data_0")));
+ base::FilePath data_name(input_path.Append(FILE_PATH_LITERAL("data_0")));
if (version != GetMajorVersionFromFile(data_name))
return 0;
@@ -333,15 +334,15 @@ int GetMajorVersion(const FilePath& input_path) {
}
// Dumps the headers of all files.
-int DumpHeaders(const FilePath& input_path) {
- FilePath index_name(input_path.Append(kIndexName));
+int DumpHeaders(const base::FilePath& input_path) {
+ base::FilePath index_name(input_path.Append(kIndexName));
disk_cache::CacheAddr stats_addr = 0;
DumpIndexHeader(index_name, &stats_addr);
file_util::FileEnumerator iter(input_path, false,
file_util::FileEnumerator::FILES,
FILE_PATH_LITERAL("data_*"));
- for (FilePath file = iter.Next(); !file.empty(); file = iter.Next())
+ for (base::FilePath file = iter.Next(); !file.empty(); file = iter.Next())
DumpBlockHeader(file);
DumpStats(input_path, stats_addr);
@@ -349,7 +350,7 @@ int DumpHeaders(const FilePath& input_path) {
}
// Dumps all entries from the cache.
-int DumpContents(const FilePath& input_path) {
+int DumpContents(const base::FilePath& input_path) {
DumpHeaders(input_path);
// We need a message loop, although we really don't run any task.
diff --git a/net/tools/dump_cache/dump_files.h b/net/tools/dump_cache/dump_files.h
index abc8b5b..a3a67a6 100644
--- a/net/tools/dump_cache/dump_files.h
+++ b/net/tools/dump_cache/dump_files.h
@@ -12,12 +12,12 @@
#include "base/file_path.h"
// Returns the major version of the specified cache.
-int GetMajorVersion(const FilePath& input_path);
+int GetMajorVersion(const base::FilePath& input_path);
// Dumps all entries from the cache.
-int DumpContents(const FilePath& input_path);
+int DumpContents(const base::FilePath& input_path);
// Dumps the headers of all files.
-int DumpHeaders(const FilePath& input_path);
+int DumpHeaders(const base::FilePath& input_path);
#endif // NET_TOOLS_DUMP_CACHE_DUMP_FILES_H_
diff --git a/net/tools/dump_cache/simple_cache_dumper.cc b/net/tools/dump_cache/simple_cache_dumper.cc
index 73c3cd0..cb2bc47 100644
--- a/net/tools/dump_cache/simple_cache_dumper.cc
+++ b/net/tools/dump_cache/simple_cache_dumper.cc
@@ -18,7 +18,8 @@
namespace net {
-SimpleCacheDumper::SimpleCacheDumper(FilePath input_path, FilePath output_path)
+SimpleCacheDumper::SimpleCacheDumper(base::FilePath input_path,
+ base::FilePath output_path)
: state_(STATE_NONE),
input_path_(input_path),
output_path_(output_path),
diff --git a/net/tools/dump_cache/simple_cache_dumper.h b/net/tools/dump_cache/simple_cache_dumper.h
index 4a76529..1b28629 100644
--- a/net/tools/dump_cache/simple_cache_dumper.h
+++ b/net/tools/dump_cache/simple_cache_dumper.h
@@ -26,7 +26,7 @@ class IOBufferWithSize;
// response body, as if the HTTP response were written directly to disk.
class SimpleCacheDumper {
public:
- SimpleCacheDumper(FilePath input_path, FilePath output_path);
+ SimpleCacheDumper(base::FilePath input_path, base::FilePath output_path);
~SimpleCacheDumper();
// Dumps the cache to disk. Returns OK if the operation was successful,
@@ -74,8 +74,8 @@ class SimpleCacheDumper {
void OnIOComplete(int rv);
State state_;
- FilePath input_path_;
- FilePath output_path_;
+ base::FilePath input_path_;
+ base::FilePath output_path_;
disk_cache::Backend* cache_;
scoped_ptr<DiskDumper> writer_;
base::Thread* cache_thread_;
diff --git a/net/tools/dump_cache/upgrade_win.cc b/net/tools/dump_cache/upgrade_win.cc
index c0e628a..be8a29c 100644
--- a/net/tools/dump_cache/upgrade_win.cc
+++ b/net/tools/dump_cache/upgrade_win.cc
@@ -214,7 +214,7 @@ bool BaseSM::IsPending() {
class MasterSM : public BaseSM {
public:
- MasterSM(const FilePath& path, HANDLE channel)
+ MasterSM(const base::FilePath& path, HANDLE channel)
: BaseSM(channel),
path_(path) {
}
@@ -264,7 +264,7 @@ class MasterSM : public BaseSM {
int read_size_;
scoped_ptr<disk_cache::Backend> cache_;
CacheDumpWriter* writer_;
- const FilePath path_;
+ const base::FilePath path_;
};
void MasterSM::OnIOCompleted(MessageLoopForIO::IOContext* context,
@@ -552,7 +552,7 @@ void MasterSM::Fail() {
class SlaveSM : public BaseSM {
public:
- SlaveSM(const FilePath& path, HANDLE channel);
+ SlaveSM(const base::FilePath& path, HANDLE channel);
virtual ~SlaveSM();
bool DoInit();
@@ -585,7 +585,7 @@ class SlaveSM : public BaseSM {
scoped_ptr<disk_cache::BackendImpl> cache_;
};
-SlaveSM::SlaveSM(const FilePath& path, HANDLE channel)
+SlaveSM::SlaveSM(const base::FilePath& path, HANDLE channel)
: BaseSM(channel), iterator_(NULL) {
disk_cache::Backend* cache;
net::TestCompletionCallback cb;
@@ -881,7 +881,7 @@ HANDLE CreateServer(string16* pipe_number) {
}
// This is the controller process for an upgrade operation.
-int UpgradeCache(const FilePath& output_path, HANDLE pipe) {
+int UpgradeCache(const base::FilePath& output_path, HANDLE pipe) {
MessageLoop loop(MessageLoop::TYPE_IO);
MasterSM master(output_path, pipe);
@@ -895,7 +895,7 @@ int UpgradeCache(const FilePath& output_path, HANDLE pipe) {
}
// This process will only execute commands from the controller.
-int RunSlave(const FilePath& input_path, const string16& pipe_number) {
+int RunSlave(const base::FilePath& input_path, const string16& pipe_number) {
MessageLoop loop(MessageLoop::TYPE_IO);
base::win::ScopedHandle pipe(OpenServer(pipe_number));
diff --git a/net/tools/dump_cache/upgrade_win.h b/net/tools/dump_cache/upgrade_win.h
index a2b1d72..79ea50e 100644
--- a/net/tools/dump_cache/upgrade_win.h
+++ b/net/tools/dump_cache/upgrade_win.h
@@ -13,7 +13,7 @@ HANDLE CreateServer(string16* pipe_number);
// Runs a loop to write a new cache with all the data available from a slave
// process connected through the provided |pipe|.
-int UpgradeCache(const FilePath& output_path, HANDLE pipe);
+int UpgradeCache(const base::FilePath& output_path, HANDLE pipe);
// This process will only execute commands from the controller.
-int RunSlave(const FilePath& input_path, const string16& pipe_number);
+int RunSlave(const base::FilePath& input_path, const string16& pipe_number);
diff --git a/net/tools/testserver/run_testserver.cc b/net/tools/testserver/run_testserver.cc
index 4e4220a..85af4d5 100644
--- a/net/tools/testserver/run_testserver.cc
+++ b/net/tools/testserver/run_testserver.cc
@@ -89,7 +89,7 @@ int main(int argc, const char* argv[]) {
}
}
- FilePath doc_root = command_line->GetSwitchValuePath("doc-root");
+ base::FilePath doc_root = command_line->GetSwitchValuePath("doc-root");
if (doc_root.empty()) {
printf("Error: --doc-root must be specified\n");
PrintUsage();
diff --git a/net/tools/tld_cleanup/tld_cleanup.cc b/net/tools/tld_cleanup/tld_cleanup.cc
index 6774cc4..db66c4c 100644
--- a/net/tools/tld_cleanup/tld_cleanup.cc
+++ b/net/tools/tld_cleanup/tld_cleanup.cc
@@ -58,7 +58,7 @@ const char kEndPrivateDomainsComment[] = "// ===END PRIVATE DOMAINS===";
// Writes the list of domain rules contained in the 'rules' set to the
// 'outfile', with each rule terminated by a LF. The file must already have
// been created with write access.
-bool WriteRules(const RuleMap& rules, const FilePath& outfile) {
+bool WriteRules(const RuleMap& rules, const base::FilePath& outfile) {
std::string data;
data.append(
"%{\n"
@@ -166,8 +166,8 @@ NormalizeResult NormalizeRule(std::string* domain, Rule* rule) {
// Loads the file described by 'in_filename', converts it to the desired format
// (see the file comments above), and saves it into 'out_filename'. Returns
// the most severe of the result codes encountered when normalizing the rules.
-NormalizeResult NormalizeFile(const FilePath& in_filename,
- const FilePath& out_filename) {
+NormalizeResult NormalizeFile(const base::FilePath& in_filename,
+ const base::FilePath& out_filename) {
std::string data;
if (!file_util::ReadFileToString(in_filename, &data)) {
LOG(ERROR) << "Unable to read file";
@@ -280,7 +280,7 @@ int main(int argc, const char* argv[]) {
CommandLine::Init(argc, argv);
- FilePath log_filename;
+ base::FilePath log_filename;
PathService::Get(base::DIR_EXE, &log_filename);
log_filename = log_filename.AppendASCII("tld_cleanup.log");
logging::InitLogging(
@@ -292,14 +292,14 @@ int main(int argc, const char* argv[]) {
icu_util::Initialize();
- FilePath input_file;
+ base::FilePath input_file;
PathService::Get(base::DIR_SOURCE_ROOT, &input_file);
input_file = input_file.Append(FILE_PATH_LITERAL("net"))
.Append(FILE_PATH_LITERAL("base"))
.Append(FILE_PATH_LITERAL(
"registry_controlled_domains"))
.Append(FILE_PATH_LITERAL("effective_tld_names.dat"));
- FilePath output_file;
+ base::FilePath output_file;
PathService::Get(base::DIR_SOURCE_ROOT, &output_file);
output_file = output_file.Append(FILE_PATH_LITERAL("net"))
.Append(FILE_PATH_LITERAL("base"))