summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/visitedlink/browser/visitedlink_master.cc12
-rw-r--r--components/visitedlink/browser/visitedlink_master.h6
-rw-r--r--components/visitedlink/test/visitedlink_perftest.cc2
-rw-r--r--components/visitedlink/test/visitedlink_unittest.cc4
-rw-r--r--courgette/base_test_unittest.cc2
-rw-r--r--courgette/base_test_unittest.h2
-rw-r--r--courgette/courgette.h6
-rw-r--r--courgette/courgette_tool.cc54
-rw-r--r--courgette/ensemble_apply.cc12
-rw-r--r--courgette/memory_allocator.cc2
-rw-r--r--crypto/nss_util.cc32
-rw-r--r--device/bluetooth/bluetooth_service_record_chromeos_unittest.cc4
-rw-r--r--jingle/glue/logging_unittest.cc6
13 files changed, 72 insertions, 72 deletions
diff --git a/components/visitedlink/browser/visitedlink_master.cc b/components/visitedlink/browser/visitedlink_master.cc
index e09fafa..6db2026 100644
--- a/components/visitedlink/browser/visitedlink_master.cc
+++ b/components/visitedlink/browser/visitedlink_master.cc
@@ -68,7 +68,7 @@ void GenerateSalt(uint8 salt[LINK_SALT_LENGTH]) {
}
// Opens file on a background thread to not block UI thread.
-void AsyncOpen(FILE** file, const FilePath& filename) {
+void AsyncOpen(FILE** file, const base::FilePath& filename) {
*file = OpenFile(filename, "wb+");
DLOG_IF(ERROR, !(*file)) << "Failed to open file " << filename.value();
}
@@ -194,7 +194,7 @@ VisitedLinkMaster::VisitedLinkMaster(Listener* listener,
VisitedLinkDelegate* delegate,
bool persist_to_disk,
bool suppress_rebuild,
- const FilePath& filename,
+ const base::FilePath& filename,
int32 default_table_size)
: browser_context_(NULL),
delegate_(delegate),
@@ -516,7 +516,7 @@ void VisitedLinkMaster::WriteFullTable() {
if (!file_) {
file_ = static_cast<FILE**>(calloc(1, sizeof(*file_)));
- FilePath filename;
+ base::FilePath filename;
GetDatabaseFileName(&filename);
PostIOTask(FROM_HERE, base::Bind(&AsyncOpen, file_, filename));
}
@@ -542,7 +542,7 @@ bool VisitedLinkMaster::InitFromFile() {
DCHECK(file_ == NULL);
DCHECK(persist_to_disk_);
- FilePath filename;
+ base::FilePath filename;
GetDatabaseFileName(&filename);
ScopedFILE file_closer(OpenFile(filename, "rb+"));
if (!file_closer.get())
@@ -653,7 +653,7 @@ bool VisitedLinkMaster::ReadFileHeader(FILE* file,
return true;
}
-bool VisitedLinkMaster::GetDatabaseFileName(FilePath* filename) {
+bool VisitedLinkMaster::GetDatabaseFileName(base::FilePath* filename) {
if (!database_name_override_.empty()) {
// use this filename, the directory must exist
*filename = database_name_override_;
@@ -663,7 +663,7 @@ bool VisitedLinkMaster::GetDatabaseFileName(FilePath* filename) {
if (!browser_context_ || browser_context_->GetPath().empty())
return false;
- FilePath profile_dir = browser_context_->GetPath();
+ base::FilePath profile_dir = browser_context_->GetPath();
*filename = profile_dir.Append(FILE_PATH_LITERAL("Visited Links"));
return true;
}
diff --git a/components/visitedlink/browser/visitedlink_master.h b/components/visitedlink/browser/visitedlink_master.h
index 072bbfe..aea4ccb 100644
--- a/components/visitedlink/browser/visitedlink_master.h
+++ b/components/visitedlink/browser/visitedlink_master.h
@@ -83,7 +83,7 @@ class VisitedLinkMaster : public VisitedLinkCommon {
VisitedLinkDelegate* delegate,
bool persist_to_disk,
bool suppress_rebuild,
- const FilePath& filename,
+ const base::FilePath& filename,
int32 default_table_size);
virtual ~VisitedLinkMaster();
@@ -222,7 +222,7 @@ class VisitedLinkMaster : public VisitedLinkCommon {
uint8 salt[LINK_SALT_LENGTH]);
// Fills *filename with the name of the link database filename
- bool GetDatabaseFileName(FilePath* filename);
+ bool GetDatabaseFileName(base::FilePath* filename);
// Wrapper around Window's WriteFile using asynchronous I/O. This will proxy
// the write to a background thread.
@@ -409,7 +409,7 @@ class VisitedLinkMaster : public VisitedLinkCommon {
// in release builds that give "regular" behavior.
// Overridden database file name for testing
- FilePath database_name_override_;
+ base::FilePath database_name_override_;
// When nonzero, overrides the table size for new databases for testing
int32 table_size_override_;
diff --git a/components/visitedlink/test/visitedlink_perftest.cc b/components/visitedlink/test/visitedlink_perftest.cc
index b2ab296..a059eb7 100644
--- a/components/visitedlink/test/visitedlink_perftest.cc
+++ b/components/visitedlink/test/visitedlink_perftest.cc
@@ -66,7 +66,7 @@ void FillTable(VisitedLinkMaster& master, const char* prefix,
class VisitedLink : public testing::Test {
protected:
- FilePath db_path_;
+ base::FilePath db_path_;
virtual void SetUp() {
ASSERT_TRUE(file_util::CreateTemporaryFile(&db_path_));
}
diff --git a/components/visitedlink/test/visitedlink_unittest.cc b/components/visitedlink/test/visitedlink_unittest.cc
index 08c433f..ff54743 100644
--- a/components/visitedlink/test/visitedlink_unittest.cc
+++ b/components/visitedlink/test/visitedlink_unittest.cc
@@ -227,8 +227,8 @@ class VisitedLinkTest : public testing::Test {
content::TestBrowserThread file_thread_;
// Filenames for the services;
- FilePath history_dir_;
- FilePath visited_file_;
+ base::FilePath history_dir_;
+ base::FilePath visited_file_;
scoped_ptr<VisitedLinkMaster> master_;
TestVisitedLinkDelegate delegate_;
diff --git a/courgette/base_test_unittest.cc b/courgette/base_test_unittest.cc
index f85fd35..a0e7d05 100644
--- a/courgette/base_test_unittest.cc
+++ b/courgette/base_test_unittest.cc
@@ -17,7 +17,7 @@ void BaseTest::TearDown() {
// Reads a test file into a string.
std::string BaseTest::FileContents(const char* file_name) const {
- FilePath file_path = test_dir_;
+ base::FilePath file_path = test_dir_;
file_path = file_path.AppendASCII(file_name);
std::string file_bytes;
diff --git a/courgette/base_test_unittest.h b/courgette/base_test_unittest.h
index a0733a4..e4ea0ec 100644
--- a/courgette/base_test_unittest.h
+++ b/courgette/base_test_unittest.h
@@ -23,7 +23,7 @@ class BaseTest : public testing::Test {
virtual void SetUp();
virtual void TearDown();
- FilePath test_dir_;
+ base::FilePath test_dir_;
};
#endif // COURGETTE_BASE_TEST_UNITTEST_H_
diff --git a/courgette/courgette.h b/courgette/courgette.h
index 2cd4cd7..6d3112d 100644
--- a/courgette/courgette.h
+++ b/courgette/courgette.h
@@ -77,9 +77,9 @@ Status ApplyEnsemblePatch(SourceStream* old, SourceStream* patch,
// Returns C_OK unless something went wrong.
// This function first validates that the patch file has a proper header, so the
// function can be used to 'try' a patch.
-Status ApplyEnsemblePatch(const FilePath::CharType* old_file_name,
- const FilePath::CharType* patch_file_name,
- const FilePath::CharType* new_file_name);
+Status ApplyEnsemblePatch(const base::FilePath::CharType* old_file_name,
+ const base::FilePath::CharType* patch_file_name,
+ const base::FilePath::CharType* new_file_name);
// Generates a patch that will transform the bytes in |old| into the bytes in
// |target|.
diff --git a/courgette/courgette_tool.cc b/courgette/courgette_tool.cc
index 2714e0f..95c7824 100644
--- a/courgette/courgette_tool.cc
+++ b/courgette/courgette_tool.cc
@@ -47,7 +47,7 @@ void Problem(const char* format, ...) {
exit(1);
}
-std::string ReadOrFail(const FilePath& file_name, const char* kind) {
+std::string ReadOrFail(const base::FilePath& file_name, const char* kind) {
int64 file_size = 0;
if (!file_util::GetFileSize(file_name, &file_size))
Problem("Can't read %s file.", kind);
@@ -59,7 +59,7 @@ std::string ReadOrFail(const FilePath& file_name, const char* kind) {
}
void WriteSinkToFile(const courgette::SinkStream *sink,
- const FilePath& output_file) {
+ const base::FilePath& output_file) {
int count =
file_util::WriteFile(output_file,
reinterpret_cast<const char*>(sink->Buffer()),
@@ -70,8 +70,8 @@ void WriteSinkToFile(const courgette::SinkStream *sink,
Problem("Incomplete write.");
}
-void Disassemble(const FilePath& input_file,
- const FilePath& output_file) {
+void Disassemble(const base::FilePath& input_file,
+ const base::FilePath& output_file) {
std::string buffer = ReadOrFail(input_file, "input");
courgette::AssemblyProgram* program = NULL;
@@ -106,7 +106,7 @@ void Disassemble(const FilePath& input_file,
WriteSinkToFile(&sink, output_file);
}
-bool Supported(const FilePath& input_file) {
+bool Supported(const base::FilePath& input_file) {
bool result = false;
std::string buffer = ReadOrFail(input_file, "input");
@@ -141,9 +141,9 @@ bool Supported(const FilePath& input_file) {
return result;
}
-void DisassembleAndAdjust(const FilePath& program_file,
- const FilePath& model_file,
- const FilePath& output_file) {
+void DisassembleAndAdjust(const base::FilePath& program_file,
+ const base::FilePath& model_file,
+ const base::FilePath& output_file) {
std::string program_buffer = ReadOrFail(program_file, "program");
std::string model_buffer = ReadOrFail(model_file, "reference");
@@ -196,9 +196,9 @@ void DisassembleAndAdjust(const FilePath& program_file,
// original file's stream and the new file's stream. This is completely
// uninteresting to users, but it is handy for seeing how much each which
// streams are contributing to the final file size. Adjustment is optional.
-void DisassembleAdjustDiff(const FilePath& model_file,
- const FilePath& program_file,
- const FilePath& output_file_root,
+void DisassembleAdjustDiff(const base::FilePath& model_file,
+ const base::FilePath& program_file,
+ const base::FilePath& output_file_root,
bool adjust) {
std::string model_buffer = ReadOrFail(model_file, "'old'");
std::string program_buffer = ReadOrFail(program_file, "'new'");
@@ -275,8 +275,8 @@ void DisassembleAdjustDiff(const FilePath& model_file,
}
}
-void Assemble(const FilePath& input_file,
- const FilePath& output_file) {
+void Assemble(const base::FilePath& input_file,
+ const base::FilePath& output_file) {
std::string buffer = ReadOrFail(input_file, "input");
courgette::SourceStreamSet sources;
@@ -297,9 +297,9 @@ void Assemble(const FilePath& input_file,
WriteSinkToFile(&sink, output_file);
}
-void GenerateEnsemblePatch(const FilePath& old_file,
- const FilePath& new_file,
- const FilePath& patch_file) {
+void GenerateEnsemblePatch(const base::FilePath& old_file,
+ const base::FilePath& new_file,
+ const base::FilePath& patch_file) {
std::string old_buffer = ReadOrFail(old_file, "'old' input");
std::string new_buffer = ReadOrFail(new_file, "'new' input");
@@ -317,9 +317,9 @@ void GenerateEnsemblePatch(const FilePath& old_file,
WriteSinkToFile(&patch_stream, patch_file);
}
-void ApplyEnsemblePatch(const FilePath& old_file,
- const FilePath& patch_file,
- const FilePath& new_file) {
+void ApplyEnsemblePatch(const base::FilePath& old_file,
+ const base::FilePath& patch_file,
+ const base::FilePath& new_file) {
// We do things a little differently here in order to call the same Courgette
// entry point as the installer. That entry point point takes file names and
// returns an status code but does not output any diagnostics.
@@ -374,9 +374,9 @@ void ApplyEnsemblePatch(const FilePath& old_file,
Problem("-apply failed.");
}
-void GenerateBSDiffPatch(const FilePath& old_file,
- const FilePath& new_file,
- const FilePath& patch_file) {
+void GenerateBSDiffPatch(const base::FilePath& old_file,
+ const base::FilePath& new_file,
+ const base::FilePath& patch_file) {
std::string old_buffer = ReadOrFail(old_file, "'old' input");
std::string new_buffer = ReadOrFail(new_file, "'new' input");
@@ -394,9 +394,9 @@ void GenerateBSDiffPatch(const FilePath& old_file,
WriteSinkToFile(&patch_stream, patch_file);
}
-void ApplyBSDiffPatch(const FilePath& old_file,
- const FilePath& patch_file,
- const FilePath& new_file) {
+void ApplyBSDiffPatch(const base::FilePath& old_file,
+ const base::FilePath& patch_file,
+ const base::FilePath& new_file) {
std::string old_buffer = ReadOrFail(old_file, "'old' input");
std::string patch_buffer = ReadOrFail(patch_file, "'patch' input");
@@ -438,10 +438,10 @@ int main(int argc, const char* argv[]) {
bool cmd_spread_1_adjusted = command_line.HasSwitch("gen1a");
bool cmd_spread_1_unadjusted = command_line.HasSwitch("gen1u");
- std::vector<FilePath> values;
+ std::vector<base::FilePath> values;
const CommandLine::StringVector& args = command_line.GetArgs();
for (size_t i = 0; i < args.size(); ++i) {
- values.push_back(FilePath(args[i]));
+ values.push_back(base::FilePath(args[i]));
}
// '-repeat=N' is for debugging. Running many iterations can reveal leaks and
diff --git a/courgette/ensemble_apply.cc b/courgette/ensemble_apply.cc
index 475cdf2..28312f3 100644
--- a/courgette/ensemble_apply.cc
+++ b/courgette/ensemble_apply.cc
@@ -372,12 +372,12 @@ Status ApplyEnsemblePatch(SourceStream* base,
return C_OK;
}
-Status ApplyEnsemblePatch(const FilePath::CharType* old_file_name,
- const FilePath::CharType* patch_file_name,
- const FilePath::CharType* new_file_name) {
+Status ApplyEnsemblePatch(const base::FilePath::CharType* old_file_name,
+ const base::FilePath::CharType* patch_file_name,
+ const base::FilePath::CharType* new_file_name) {
// First read enough of the patch file to validate the header is well-formed.
// A few varint32 numbers should fit in 100.
- FilePath patch_file_path(patch_file_name);
+ base::FilePath patch_file_path(patch_file_name);
file_util::MemoryMappedFile patch_file;
if (!patch_file.Initialize(patch_file_path))
return C_READ_OPEN_ERROR;
@@ -391,7 +391,7 @@ Status ApplyEnsemblePatch(const FilePath::CharType* old_file_name,
return status;
// Read the old_file.
- FilePath old_file_path(old_file_name);
+ base::FilePath old_file_path(old_file_name);
file_util::MemoryMappedFile old_file;
if (!old_file.Initialize(old_file_path))
return C_READ_ERROR;
@@ -408,7 +408,7 @@ Status ApplyEnsemblePatch(const FilePath::CharType* old_file_name,
return status;
// Write the patched data to |new_file_name|.
- FilePath new_file_path(new_file_name);
+ base::FilePath new_file_path(new_file_name);
int written =
file_util::WriteFile(
new_file_path,
diff --git a/courgette/memory_allocator.cc b/courgette/memory_allocator.cc
index b3a45b4..54b34da 100644
--- a/courgette/memory_allocator.cc
+++ b/courgette/memory_allocator.cc
@@ -31,7 +31,7 @@ void TempFile::Close() {
bool TempFile::Create() {
DCHECK(file_ == base::kInvalidPlatformFileValue);
- FilePath path;
+ base::FilePath path;
if (!file_util::CreateTemporaryFile(&path))
return false;
diff --git a/crypto/nss_util.cc b/crypto/nss_util.cc
index 454d539..b68874c 100644
--- a/crypto/nss_util.cc
+++ b/crypto/nss_util.cc
@@ -62,7 +62,7 @@ const char kChapsModuleName[] = "Chaps";
const char kChapsPath[] = "libchaps.so";
// Fake certificate authority database used for testing.
-static const FilePath::CharType kReadOnlyCertDB[] =
+static const base::FilePath::CharType kReadOnlyCertDB[] =
FILE_PATH_LITERAL("/etc/fake_root_ca/nssdb");
#endif // defined(OS_CHROMEOS)
@@ -79,8 +79,8 @@ std::string GetNSSErrorMessage() {
}
#if defined(USE_NSS)
-FilePath GetDefaultConfigDirectory() {
- FilePath dir = file_util::GetHomeDir();
+base::FilePath GetDefaultConfigDirectory() {
+ base::FilePath dir = file_util::GetHomeDir();
if (dir.empty()) {
LOG(ERROR) << "Failed to get home directory.";
return dir;
@@ -108,9 +108,9 @@ unsigned char kSupplementalUserKeyId[] = {
// by the local Google Accounts server mock we use when testing our login code.
// If this directory is not present, NSS_Init() will fail. It is up to the
// caller to failover to NSS_NoDB_Init() at that point.
-FilePath GetInitialConfigDirectory() {
+base::FilePath GetInitialConfigDirectory() {
#if defined(OS_CHROMEOS)
- return FilePath(kReadOnlyCertDB);
+ return base::FilePath(kReadOnlyCertDB);
#else
return GetDefaultConfigDirectory();
#endif // defined(OS_CHROMEOS)
@@ -161,7 +161,7 @@ char* PKCS11PasswordFunc(PK11SlotInfo* slot, PRBool retry, void* arg) {
//
// Because this function sets an environment variable it must be run before we
// go multi-threaded.
-void UseLocalCacheOfNSSDatabaseIfNFS(const FilePath& database_dir) {
+void UseLocalCacheOfNSSDatabaseIfNFS(const base::FilePath& database_dir) {
#if defined(OS_LINUX) || defined(OS_OPENBSD)
struct statfs buf;
if (statfs(database_dir.value().c_str(), &buf) == 0) {
@@ -472,7 +472,7 @@ class NSSInitSingleton {
#endif // defined(OS_IOS)
} else {
#if defined(USE_NSS)
- FilePath database_dir = GetInitialConfigDirectory();
+ base::FilePath database_dir = GetInitialConfigDirectory();
if (!database_dir.empty()) {
// This duplicates the work which should have been done in
// EarlySetupForNSSInit. However, this function is idempotent so
@@ -605,7 +605,7 @@ class NSSInitSingleton {
}
#endif
- static PK11SlotInfo* OpenUserDB(const FilePath& path,
+ static PK11SlotInfo* OpenUserDB(const base::FilePath& path,
const char* description) {
const std::string modspec =
StringPrintf("configDir='sql:%s' tokenDescription='%s'",
@@ -650,7 +650,7 @@ base::LazyInstance<NSSInitSingleton>::Leaky
#if defined(USE_NSS)
void EarlySetupForNSSInit() {
- FilePath database_dir = GetInitialConfigDirectory();
+ base::FilePath database_dir = GetInitialConfigDirectory();
if (!database_dir.empty())
UseLocalCacheOfNSSDatabaseIfNFS(database_dir);
}
@@ -692,21 +692,21 @@ void LoadNSSLibraries() {
// Some NSS libraries are linked dynamically so load them here.
#if defined(USE_NSS)
// Try to search for multiple directories to load the libraries.
- std::vector<FilePath> paths;
+ std::vector<base::FilePath> paths;
// Use relative path to Search PATH for the library files.
- paths.push_back(FilePath());
+ paths.push_back(base::FilePath());
// For Debian derivatives NSS libraries are located here.
- paths.push_back(FilePath("/usr/lib/nss"));
+ paths.push_back(base::FilePath("/usr/lib/nss"));
// Ubuntu 11.10 (Oneiric) places the libraries here.
#if defined(ARCH_CPU_X86_64)
- paths.push_back(FilePath("/usr/lib/x86_64-linux-gnu/nss"));
+ paths.push_back(base::FilePath("/usr/lib/x86_64-linux-gnu/nss"));
#elif defined(ARCH_CPU_X86)
- paths.push_back(FilePath("/usr/lib/i386-linux-gnu/nss"));
+ paths.push_back(base::FilePath("/usr/lib/i386-linux-gnu/nss"));
#elif defined(ARCH_CPU_ARMEL)
- paths.push_back(FilePath("/usr/lib/arm-linux-gnueabi/nss"));
+ paths.push_back(base::FilePath("/usr/lib/arm-linux-gnueabi/nss"));
#endif
// A list of library files to load.
@@ -719,7 +719,7 @@ void LoadNSSLibraries() {
size_t loaded = 0;
for (size_t i = 0; i < libs.size(); ++i) {
for (size_t j = 0; j < paths.size(); ++j) {
- FilePath path = paths[j].Append(libs[i]);
+ base::FilePath path = paths[j].Append(libs[i]);
base::NativeLibrary lib = base::LoadNativeLibrary(path, NULL);
if (lib) {
++loaded;
diff --git a/device/bluetooth/bluetooth_service_record_chromeos_unittest.cc b/device/bluetooth/bluetooth_service_record_chromeos_unittest.cc
index 78b2d5a..bd9e591 100644
--- a/device/bluetooth/bluetooth_service_record_chromeos_unittest.cc
+++ b/device/bluetooth/bluetooth_service_record_chromeos_unittest.cc
@@ -26,8 +26,8 @@ namespace chromeos {
class BluetoothServiceRecordChromeOSTest : public testing::Test {
public:
- FilePath GetTestDataFilePath(const char* file) {
- FilePath path;
+ base::FilePath GetTestDataFilePath(const char* file) {
+ base::FilePath path;
PathService::Get(base::DIR_SOURCE_ROOT, &path);
path = path.AppendASCII("device");
path = path.AppendASCII("test");
diff --git a/jingle/glue/logging_unittest.cc b/jingle/glue/logging_unittest.cc
index 0f3e946..a9f0d8e 100644
--- a/jingle/glue/logging_unittest.cc
+++ b/jingle/glue/logging_unittest.cc
@@ -79,7 +79,7 @@ TEST(LibjingleLogTest, DefaultConfiguration) {
LOG_V(talk_base::LS_SENSITIVE) << AsString(talk_base::LS_SENSITIVE);
// Read file to string.
- FilePath file_path(log_file_name);
+ base::FilePath file_path(log_file_name);
std::string contents_of_file;
file_util::ReadFileToString(file_path, &contents_of_file);
@@ -106,7 +106,7 @@ TEST(LibjingleLogTest, InfoConfiguration) {
LOG_V(talk_base::LS_SENSITIVE) << AsString(talk_base::LS_SENSITIVE);
// Read file to string.
- FilePath file_path(log_file_name);
+ base::FilePath file_path(log_file_name);
std::string contents_of_file;
file_util::ReadFileToString(file_path, &contents_of_file);
@@ -140,7 +140,7 @@ TEST(LibjingleLogTest, LogEverythingConfiguration) {
LOG_V(talk_base::LS_SENSITIVE) << AsString(talk_base::LS_SENSITIVE);
// Read file to string.
- FilePath file_path(log_file_name);
+ base::FilePath file_path(log_file_name);
std::string contents_of_file;
file_util::ReadFileToString(file_path, &contents_of_file);