summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-17 19:36:03 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-02-17 19:36:03 +0000
commitaaa6df4d3d1931eec2235902f791f4e414cd09e8 (patch)
tree9552421ac5000a541b897508e4e73fd33325a587
parent6beee703776760481ae8fd9784e571ea324d464d (diff)
downloadchromium_src-aaa6df4d3d1931eec2235902f791f4e414cd09e8.zip
chromium_src-aaa6df4d3d1931eec2235902f791f4e414cd09e8.tar.gz
chromium_src-aaa6df4d3d1931eec2235902f791f4e414cd09e8.tar.bz2
Disable "using base::FilePath" on Linux since it now compiles.
This keeps the using for other platforms temporarily. This patch is to "stop the bleeding" since new conflicts are added every day. The other platforms will be fixed in followup patches. This also adds an exception for the MTPD code which has a circular dependency on FilePath. Review URL: https://codereview.chromium.org/12282019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@183043 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/base_paths_mac.mm12
-rw-r--r--base/file_path.h9
-rw-r--r--base/file_util_android.cc2
-rw-r--r--base/file_util_mac.mm7
-rw-r--r--base/file_version_info_mac.mm2
-rw-r--r--base/i18n/file_util_icu_unittest.cc7
-rw-r--r--base/native_library_mac.mm2
-rw-r--r--base/process_linux.cc12
-rw-r--r--chrome/browser/chromeos/drive/drive_scheduler_unittest.cc28
-rw-r--r--chrome/browser/chromeos/extensions/wallpaper_private_api.cc20
-rw-r--r--chrome/browser/chromeos/extensions/wallpaper_private_api.h4
-rw-r--r--chrome/installer/util/create_reg_key_work_item.cc7
-rw-r--r--chrome/installer/util/google_update_util.cc2
-rw-r--r--chrome/installer/util/helper.cc9
-rw-r--r--chrome/installer/util/installation_state.cc2
-rw-r--r--chrome/installer/util/installer_state.cc5
-rw-r--r--chrome/installer/util/logging_installer.cc2
-rw-r--r--chrome/test/pyautolib/pyautolib.i17
-rw-r--r--chromeos/network/onc/onc_test_utils.cc4
-rw-r--r--chromeos/tools/onc_validator/onc_validator.cc2
-rw-r--r--net/socket/tcp_client_socket.cc2
21 files changed, 88 insertions, 69 deletions
diff --git a/base/base_paths_mac.mm b/base/base_paths_mac.mm
index 630f742..39a5814 100644
--- a/base/base_paths_mac.mm
+++ b/base/base_paths_mac.mm
@@ -21,7 +21,7 @@
namespace {
-void GetNSExecutablePath(FilePath* path) {
+void GetNSExecutablePath(base::FilePath* path) {
DCHECK(path);
// Executable path can have relative references ("..") depending on
// how the app was launched.
@@ -32,19 +32,19 @@ void GetNSExecutablePath(FilePath* path) {
int rv = _NSGetExecutablePath(WriteInto(&executable_path, executable_length),
&executable_length);
DCHECK_EQ(rv, 0);
- *path = FilePath(executable_path);
+ *path = base::FilePath(executable_path);
}
// Returns true if the module for |address| is found. |path| will contain
// the path to the module. Note that |path| may not be absolute.
-bool GetModulePathForAddress(FilePath* path,
+bool GetModulePathForAddress(base::FilePath* path,
const void* address) WARN_UNUSED_RESULT;
-bool GetModulePathForAddress(FilePath* path, const void* address) {
+bool GetModulePathForAddress(base::FilePath* path, const void* address) {
Dl_info info;
if (dladdr(address, &info) == 0)
return false;
- *path = FilePath(info.dli_fname);
+ *path = base::FilePath(info.dli_fname);
return true;
}
@@ -52,7 +52,7 @@ bool GetModulePathForAddress(FilePath* path, const void* address) {
namespace base {
-bool PathProviderMac(int key, FilePath* result) {
+bool PathProviderMac(int key, base::FilePath* result) {
switch (key) {
case base::FILE_EXE:
GetNSExecutablePath(result);
diff --git a/base/file_path.h b/base/file_path.h
index e5c4b84..c01da94 100644
--- a/base/file_path.h
+++ b/base/file_path.h
@@ -402,8 +402,15 @@ class BASE_EXPORT FilePath {
} // namespace base
-// TODO(brettw) remove this once callers properly use the base namespace.
+// Temporarily have non-Linux platforms use a "using" so we can convert those
+// over one-at-a-time.
+//
+// http://crosbug.com/39008 MTPD has a circular dependency on base and uses the
+// old non-namespaced FilePath.
+#if defined(MTPD_DEVICE_MANAGER_H_) || defined(OS_CHROMEOS) || \
+ !defined(OS_LINUX)
using base::FilePath;
+#endif
// This is required by googletest to print a readable output on test failures.
BASE_EXPORT extern void PrintTo(const base::FilePath& path, std::ostream* out);
diff --git a/base/file_util_android.cc b/base/file_util_android.cc
index 79db279..615ffe6 100644
--- a/base/file_util_android.cc
+++ b/base/file_util_android.cc
@@ -9,7 +9,7 @@
namespace file_util {
-bool GetShmemTempDir(FilePath* path, bool executable) {
+bool GetShmemTempDir(base::FilePath* path, bool executable) {
return PathService::Get(base::DIR_CACHE, path);
}
diff --git a/base/file_util_mac.mm b/base/file_util_mac.mm
index 2499f44..0de3786 100644
--- a/base/file_util_mac.mm
+++ b/base/file_util_mac.mm
@@ -15,7 +15,7 @@
namespace file_util {
-bool GetTempDir(FilePath* path) {
+bool GetTempDir(base::FilePath* path) {
NSString* tmp = NSTemporaryDirectory();
if (tmp == nil)
return false;
@@ -23,11 +23,12 @@ bool GetTempDir(FilePath* path) {
return true;
}
-bool GetShmemTempDir(FilePath* path, bool executable) {
+bool GetShmemTempDir(base::FilePath* path, bool executable) {
return GetTempDir(path);
}
-bool CopyFileUnsafe(const FilePath& from_path, const FilePath& to_path) {
+bool CopyFileUnsafe(const base::FilePath& from_path,
+ const base::FilePath& to_path) {
base::ThreadRestrictions::AssertIOAllowed();
return (copyfile(from_path.value().c_str(),
to_path.value().c_str(), NULL, COPYFILE_ALL) == 0);
diff --git a/base/file_version_info_mac.mm b/base/file_version_info_mac.mm
index c989443..54af633 100644
--- a/base/file_version_info_mac.mm
+++ b/base/file_version_info_mac.mm
@@ -25,7 +25,7 @@ FileVersionInfo* FileVersionInfo::CreateFileVersionInfoForCurrentModule() {
// static
FileVersionInfo* FileVersionInfo::CreateFileVersionInfo(
- const FilePath& file_path) {
+ const base::FilePath& file_path) {
NSString* path = base::SysUTF8ToNSString(file_path.value());
NSBundle* bundle = [NSBundle bundleWithPath:path];
return new FileVersionInfoMac(bundle);
diff --git a/base/i18n/file_util_icu_unittest.cc b/base/i18n/file_util_icu_unittest.cc
index dfc4943..f49ac5a 100644
--- a/base/i18n/file_util_icu_unittest.cc
+++ b/base/i18n/file_util_icu_unittest.cc
@@ -96,10 +96,11 @@ static const struct normalize_name_encoding_test_cases {
TEST_F(FileUtilICUTest, NormalizeFileNameEncoding) {
for (size_t i = 0; i < arraysize(kNormalizeFileNameEncodingTestCases); i++) {
- FilePath path(kNormalizeFileNameEncodingTestCases[i].original_path);
+ base::FilePath path(kNormalizeFileNameEncodingTestCases[i].original_path);
file_util::NormalizeFileNameEncoding(&path);
- EXPECT_EQ(FilePath(kNormalizeFileNameEncodingTestCases[i].normalized_path),
- path);
+ EXPECT_EQ(
+ base::FilePath(kNormalizeFileNameEncodingTestCases[i].normalized_path),
+ path);
}
}
diff --git a/base/native_library_mac.mm b/base/native_library_mac.mm
index 9f7a967..daaaeb0 100644
--- a/base/native_library_mac.mm
+++ b/base/native_library_mac.mm
@@ -16,7 +16,7 @@
namespace base {
// static
-NativeLibrary LoadNativeLibrary(const FilePath& library_path,
+NativeLibrary LoadNativeLibrary(const base::FilePath& library_path,
std::string* error) {
// dlopen() etc. open the file off disk.
if (library_path.Extension() == "dylib" ||
diff --git a/base/process_linux.cc b/base/process_linux.cc
index 09fb9eb..83d9649 100644
--- a/base/process_linux.cc
+++ b/base/process_linux.cc
@@ -38,12 +38,12 @@ struct CGroups {
// all background renderers. This allows us to limit the impact of background
// renderers on foreground ones to a greater level than simple renicing.
bool enabled;
- FilePath foreground_file;
- FilePath background_file;
+ base::FilePath foreground_file;
+ base::FilePath background_file;
CGroups() {
- foreground_file = FilePath(StringPrintf(kControlPath, kForeground));
- background_file = FilePath(StringPrintf(kControlPath, kBackground));
+ foreground_file = base::FilePath(StringPrintf(kControlPath, kForeground));
+ background_file = base::FilePath(StringPrintf(kControlPath, kBackground));
file_util::FileSystemType foreground_type;
file_util::FileSystemType background_type;
enabled =
@@ -69,7 +69,7 @@ bool Process::IsProcessBackgrounded() const {
if (cgroups.Get().enabled) {
std::string proc;
if (file_util::ReadFileToString(
- FilePath(StringPrintf(kProcPath, process_)),
+ base::FilePath(StringPrintf(kProcPath, process_)),
&proc)) {
std::vector<std::string> proc_parts;
base::SplitString(proc, ':', &proc_parts);
@@ -90,7 +90,7 @@ bool Process::SetProcessBackgrounded(bool background) {
#if defined(OS_CHROMEOS)
if (cgroups.Get().enabled) {
std::string pid = StringPrintf("%d", process_);
- const FilePath file =
+ const base::FilePath file =
background ?
cgroups.Get().background_file : cgroups.Get().foreground_file;
return file_util::WriteFile(file, pid.c_str(), pid.size()) > 0;
diff --git a/chrome/browser/chromeos/drive/drive_scheduler_unittest.cc b/chrome/browser/chromeos/drive/drive_scheduler_unittest.cc
index d991588..becfcdc 100644
--- a/chrome/browser/chromeos/drive/drive_scheduler_unittest.cc
+++ b/chrome/browser/chromeos/drive/drive_scheduler_unittest.cc
@@ -403,11 +403,12 @@ TEST_F(DriveSchedulerTest, DownloadFileCellularDisabled) {
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
const GURL kContentUrl("https://file_content_url/");
- const FilePath kOutputFilePath = temp_dir.path().AppendASCII("whatever.txt");
+ const base::FilePath kOutputFilePath =
+ temp_dir.path().AppendASCII("whatever.txt");
google_apis::GDataErrorCode download_error = google_apis::GDATA_OTHER_ERROR;
- FilePath output_file_path;
+ base::FilePath output_file_path;
scheduler_->DownloadFile(
- FilePath::FromUTF8Unsafe("/drive/whatever.txt"), // virtual path
+ base::FilePath::FromUTF8Unsafe("/drive/whatever.txt"), // virtual path
kOutputFilePath,
kContentUrl,
DriveClientContext(BACKGROUND),
@@ -460,11 +461,12 @@ TEST_F(DriveSchedulerTest, DownloadFileWimaxDisabled) {
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
const GURL kContentUrl("https://file_content_url/");
- const FilePath kOutputFilePath = temp_dir.path().AppendASCII("whatever.txt");
+ const base::FilePath kOutputFilePath =
+ temp_dir.path().AppendASCII("whatever.txt");
google_apis::GDataErrorCode download_error = google_apis::GDATA_OTHER_ERROR;
- FilePath output_file_path;
+ base::FilePath output_file_path;
scheduler_->DownloadFile(
- FilePath::FromUTF8Unsafe("/drive/whatever.txt"), // virtual path
+ base::FilePath::FromUTF8Unsafe("/drive/whatever.txt"), // virtual path
kOutputFilePath,
kContentUrl,
DriveClientContext(BACKGROUND),
@@ -517,11 +519,12 @@ TEST_F(DriveSchedulerTest, DownloadFileCellularEnabled) {
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
const GURL kContentUrl("https://file_content_url/");
- const FilePath kOutputFilePath = temp_dir.path().AppendASCII("whatever.txt");
+ const base::FilePath kOutputFilePath =
+ temp_dir.path().AppendASCII("whatever.txt");
google_apis::GDataErrorCode download_error = google_apis::GDATA_OTHER_ERROR;
- FilePath output_file_path;
+ base::FilePath output_file_path;
scheduler_->DownloadFile(
- FilePath::FromUTF8Unsafe("/drive/whatever.txt"), // virtual path
+ base::FilePath::FromUTF8Unsafe("/drive/whatever.txt"), // virtual path
kOutputFilePath,
kContentUrl,
DriveClientContext(BACKGROUND),
@@ -566,11 +569,12 @@ TEST_F(DriveSchedulerTest, DownloadFileWimaxEnabled) {
ASSERT_TRUE(temp_dir.CreateUniqueTempDir());
const GURL kContentUrl("https://file_content_url/");
- const FilePath kOutputFilePath = temp_dir.path().AppendASCII("whatever.txt");
+ const base::FilePath kOutputFilePath =
+ temp_dir.path().AppendASCII("whatever.txt");
google_apis::GDataErrorCode download_error = google_apis::GDATA_OTHER_ERROR;
- FilePath output_file_path;
+ base::FilePath output_file_path;
scheduler_->DownloadFile(
- FilePath::FromUTF8Unsafe("/drive/whatever.txt"), // virtual path
+ base::FilePath::FromUTF8Unsafe("/drive/whatever.txt"), // virtual path
kOutputFilePath,
kContentUrl,
DriveClientContext(BACKGROUND),
diff --git a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
index e7e2907..d506b64 100644
--- a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
+++ b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
@@ -85,8 +85,8 @@ bool SaveData(int key, const std::string& file_name, const std::string& data) {
// not be found or failed to read file to string |data|. Note if the |file_name|
// can not be found in the directory, return true with empty |data|. It is
// expected that we may try to access file which did not saved yet.
-bool GetData(const FilePath& path, std::string* data) {
- FilePath data_dir = path.DirName();
+bool GetData(const base::FilePath& path, std::string* data) {
+ base::FilePath data_dir = path.DirName();
if (!file_util::DirectoryExists(data_dir) &&
!file_util::CreateDirectory(data_dir))
return false;
@@ -511,7 +511,7 @@ void WallpaperPrivateSetCustomWallpaperFunction::OnWallpaperDecoded(
image_data_.end());
chromeos::UserImage image(wallpaper, raw_image);
std::string file = base::Int64ToString(base::Time::Now().ToInternalValue());
- FilePath thumbnail_path = wallpaper_manager->GetCustomWallpaperPath(
+ base::FilePath thumbnail_path = wallpaper_manager->GetCustomWallpaperPath(
chromeos::kThumbnailWallpaperSubDir, email_, file);
sequence_token_ = BrowserThread::GetBlockingPool()->
@@ -538,7 +538,7 @@ void WallpaperPrivateSetCustomWallpaperFunction::OnWallpaperDecoded(
}
void WallpaperPrivateSetCustomWallpaperFunction::GenerateThumbnail(
- const FilePath& thumbnail_path, scoped_ptr<gfx::ImageSkia> image) {
+ const base::FilePath& thumbnail_path, scoped_ptr<gfx::ImageSkia> image) {
DCHECK(BrowserThread::GetBlockingPool()->IsRunningSequenceOnCurrentThread(
sequence_token_));
chromeos::UserImage wallpaper(*image.get());
@@ -604,7 +604,7 @@ bool WallpaperPrivateGetThumbnailFunction::RunImpl() {
EXTENSION_FUNCTION_VALIDATE(!source.empty());
std::string file_name;
- FilePath thumbnail_path;
+ base::FilePath thumbnail_path;
std::string email = chromeos::UserManager::Get()->GetLoggedInUser()->email();
if (source == kOnlineSource) {
file_name = GURL(urlOrFile).ExtractFileName();
@@ -650,7 +650,7 @@ void WallpaperPrivateGetThumbnailFunction::FileLoaded(
SendResponse(true);
}
-void WallpaperPrivateGetThumbnailFunction::Get(const FilePath& path) {
+void WallpaperPrivateGetThumbnailFunction::Get(const base::FilePath& path) {
DCHECK(BrowserThread::GetBlockingPool()->IsRunningSequenceOnCurrentThread(
sequence_token_));
std::string data;
@@ -765,12 +765,12 @@ void WallpaperPrivateGetOfflineWallpaperListFunction::GetList(
sequence_token_));
std::vector<std::string> file_list;
if (source == kOnlineSource) {
- FilePath wallpaper_dir;
+ base::FilePath wallpaper_dir;
CHECK(PathService::Get(chrome::DIR_CHROMEOS_WALLPAPERS, &wallpaper_dir));
if (file_util::DirectoryExists(wallpaper_dir)) {
file_util::FileEnumerator files(wallpaper_dir, false,
file_util::FileEnumerator::FILES);
- for (FilePath current = files.Next(); !current.empty();
+ for (base::FilePath current = files.Next(); !current.empty();
current = files.Next()) {
std::string file_name = current.BaseName().RemoveExtension().value();
// Do not add file name of small resolution wallpaper to the list.
@@ -779,12 +779,12 @@ void WallpaperPrivateGetOfflineWallpaperListFunction::GetList(
}
}
} else {
- FilePath custom_thumbnails_dir = chromeos::WallpaperManager::Get()->
+ base::FilePath custom_thumbnails_dir = chromeos::WallpaperManager::Get()->
GetCustomWallpaperPath(chromeos::kThumbnailWallpaperSubDir, email, "");
if (file_util::DirectoryExists(custom_thumbnails_dir)) {
file_util::FileEnumerator files(custom_thumbnails_dir, false,
file_util::FileEnumerator::FILES);
- for (FilePath current = files.Next(); !current.empty();
+ for (base::FilePath current = files.Next(); !current.empty();
current = files.Next()) {
file_list.push_back(current.BaseName().value());
}
diff --git a/chrome/browser/chromeos/extensions/wallpaper_private_api.h b/chrome/browser/chromeos/extensions/wallpaper_private_api.h
index d253681..17fea01 100644
--- a/chrome/browser/chromeos/extensions/wallpaper_private_api.h
+++ b/chrome/browser/chromeos/extensions/wallpaper_private_api.h
@@ -148,7 +148,7 @@ class WallpaperPrivateSetCustomWallpaperFunction
// Generates thumbnail of custom wallpaper. A simple STRETCH is used for
// generating thunbail.
- void GenerateThumbnail(const FilePath& thumbnail_path,
+ void GenerateThumbnail(const base::FilePath& thumbnail_path,
scoped_ptr<gfx::ImageSkia> image);
// Thumbnail is ready. Calls api function javascript callback.
@@ -224,7 +224,7 @@ class WallpaperPrivateGetThumbnailFunction : public AsyncExtensionFunction {
void FileLoaded(const std::string& data);
// Gets thumbnail from |path|. If |path| does not exist, call FileNotLoaded().
- void Get(const FilePath& path);
+ void Get(const base::FilePath& path);
// Sequence token associated with wallpaper operations. Shared with
// WallpaperManager.
diff --git a/chrome/installer/util/create_reg_key_work_item.cc b/chrome/installer/util/create_reg_key_work_item.cc
index 9b9aa9b..56c3571 100644
--- a/chrome/installer/util/create_reg_key_work_item.cc
+++ b/chrome/installer/util/create_reg_key_work_item.cc
@@ -17,11 +17,12 @@ namespace {
// TODO: refactor this because it is only used once.
void UpOneDirectoryOrEmpty(std::wstring* dir) {
- FilePath path = FilePath::FromWStringHack(*dir);
- FilePath directory = path.DirName();
+ base::FilePath path = base::FilePath::FromWStringHack(*dir);
+ base::FilePath directory = path.DirName();
// If there is no separator, we will get back kCurrentDirectory.
// In this case, clear dir.
- if (directory == path || directory.value() == FilePath::kCurrentDirectory)
+ if (directory == path || directory.value() ==
+ base::FilePath::kCurrentDirectory)
dir->clear();
else
*dir = directory.value();
diff --git a/chrome/installer/util/google_update_util.cc b/chrome/installer/util/google_update_util.cc
index 4c502fe..1d39d67 100644
--- a/chrome/installer/util/google_update_util.cc
+++ b/chrome/installer/util/google_update_util.cc
@@ -43,7 +43,7 @@ bool IsGoogleUpdatePresent(bool system_install) {
// Returns GoogleUpdateSetup.exe's executable path at specified level.
// or an empty path if none is found.
-FilePath GetGoogleUpdateSetupExe(bool system_install) {
+base::FilePath GetGoogleUpdateSetupExe(bool system_install) {
const HKEY root_key = system_install ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
RegKey update_key;
diff --git a/chrome/installer/util/helper.cc b/chrome/installer/util/helper.cc
index 76ff169..52580a4 100644
--- a/chrome/installer/util/helper.cc
+++ b/chrome/installer/util/helper.cc
@@ -16,9 +16,9 @@
namespace {
-FilePath GetChromeInstallBasePath(bool system,
- BrowserDistribution* distribution,
- const wchar_t* sub_path) {
+base::FilePath GetChromeInstallBasePath(bool system,
+ BrowserDistribution* distribution,
+ const wchar_t* sub_path) {
base::FilePath install_path;
if (system) {
PathService::Get(base::DIR_PROGRAM_FILES, &install_path);
@@ -38,7 +38,8 @@ FilePath GetChromeInstallBasePath(bool system,
namespace installer {
-FilePath GetChromeInstallPath(bool system_install, BrowserDistribution* dist) {
+base::FilePath GetChromeInstallPath(bool system_install,
+ BrowserDistribution* dist) {
return GetChromeInstallBasePath(system_install, dist, kInstallBinaryDir);
}
diff --git a/chrome/installer/util/installation_state.cc b/chrome/installer/util/installation_state.cc
index c8c8604..43c73ce 100644
--- a/chrome/installer/util/installation_state.cc
+++ b/chrome/installer/util/installation_state.cc
@@ -143,7 +143,7 @@ bool ProductState::Initialize(bool system_install,
return version_.get() != NULL;
}
-FilePath ProductState::GetSetupPath() const {
+base::FilePath ProductState::GetSetupPath() const {
return uninstall_command_.GetProgram();
}
diff --git a/chrome/installer/util/installer_state.cc b/chrome/installer/util/installer_state.cc
index b5fde77..66ffb24 100644
--- a/chrome/installer/util/installer_state.cc
+++ b/chrome/installer/util/installer_state.cc
@@ -346,7 +346,7 @@ void InstallerState::set_package_type(PackageType type) {
// Returns the Chrome binaries directory for multi-install or |dist|'s directory
// otherwise.
-FilePath InstallerState::GetDefaultProductInstallPath(
+base::FilePath InstallerState::GetDefaultProductInstallPath(
BrowserDistribution* dist) const {
DCHECK(dist);
DCHECK(package_type_ != UNKNOWN_PACKAGE_TYPE);
@@ -597,7 +597,8 @@ bool InstallerState::IsChromeFrameRunning(
return in_use;
}
-FilePath InstallerState::GetInstallerDirectory(const Version& version) const {
+base::FilePath InstallerState::GetInstallerDirectory(
+ const Version& version) const {
return target_path().Append(ASCIIToWide(version.GetString()))
.Append(kInstallerDir);
}
diff --git a/chrome/installer/util/logging_installer.cc b/chrome/installer/util/logging_installer.cc
index 43791de..f11ec13 100644
--- a/chrome/installer/util/logging_installer.cc
+++ b/chrome/installer/util/logging_installer.cc
@@ -113,7 +113,7 @@ void EndInstallerLogging() {
installer_logging_ = false;
}
-FilePath GetLogFilePath(const installer::MasterPreferences& prefs) {
+base::FilePath GetLogFilePath(const installer::MasterPreferences& prefs) {
std::string path;
prefs.GetString(installer::master_preferences::kLogFile, &path);
if (!path.empty()) {
diff --git a/chrome/test/pyautolib/pyautolib.i b/chrome/test/pyautolib/pyautolib.i
index c9927bed..b539b74 100644
--- a/chrome/test/pyautolib/pyautolib.i
+++ b/chrome/test/pyautolib/pyautolib.i
@@ -81,6 +81,7 @@ class GURL {
};
// FilePath
+namespace base {
%feature("docstring",
"Represent a file path. Call value() to get the string.") FilePath;
class FilePath {
@@ -97,6 +98,7 @@ class FilePath {
FilePath();
explicit FilePath(const StringType& path);
};
+} // namespace base
class PyUITestSuiteBase {
public:
@@ -106,10 +108,10 @@ class PyUITestSuiteBase {
%feature("docstring", "Initialize from the path to browser dir.")
InitializeWithPath;
- void InitializeWithPath(const FilePath& browser_dir);
+ void InitializeWithPath(const base::FilePath& browser_dir);
%feature("docstring", "Set chrome source root path, used in some tests")
SetCrSourceRoot;
- void SetCrSourceRoot(const FilePath& path);
+ void SetCrSourceRoot(const base::FilePath& path);
};
class PyUITestBase {
@@ -118,7 +120,7 @@ class PyUITestBase {
%feature("docstring", "Initialize the entire setup. Should be called "
"before launching the browser. For internal use.") Initialize;
- void Initialize(const FilePath& browser_dir);
+ void Initialize(const base::FilePath& browser_dir);
%feature("docstring", "Appends a command-line switch (with associated value "
"if given) to the list of switches to be passed to the browser "
@@ -162,7 +164,7 @@ class PyUITestBase {
void set_clear_profile(bool clear_profile);
%feature("docstring", "Get the path to profile directory.") user_data_dir;
- FilePath user_data_dir() const;
+ base::FilePath user_data_dir() const;
// Meta-method
%feature("docstring", "Send a sync JSON request to Chrome. "
@@ -196,11 +198,12 @@ class TestServer {
};
// Initialize a TestServer listening on the specified host (IP or hostname).
- TestServer(Type type, const std::string& host, const FilePath& document_root);
+ TestServer(Type type, const std::string& host,
+ const base::FilePath& document_root);
// Initialize a TestServer with a specific set of SSLOptions.
TestServer(Type type,
const SSLOptions& ssl_options,
- const FilePath& document_root);
+ const base::FilePath& document_root);
%feature("docstring", "Start TestServer over an ephemeral port") Start;
bool Start();
@@ -209,7 +212,7 @@ class TestServer {
bool Stop();
%feature("docstring", "Get FilePath to the document root") document_root;
- const FilePath& document_root() const;
+ const base::FilePath& document_root() const;
std::string GetScheme() const;
diff --git a/chromeos/network/onc/onc_test_utils.cc b/chromeos/network/onc/onc_test_utils.cc
index 65bbd3d..e15baf7 100644
--- a/chromeos/network/onc/onc_test_utils.cc
+++ b/chromeos/network/onc/onc_test_utils.cc
@@ -24,7 +24,7 @@ const char kNetworkComponentDirectory[] = "network";
} // namespace
std::string ReadTestData(const std::string& filename) {
- FilePath path;
+ base::FilePath path;
if (!chromeos::test_utils::GetTestDataPath(kNetworkComponentDirectory,
filename,
&path)) {
@@ -40,7 +40,7 @@ std::string ReadTestData(const std::string& filename) {
scoped_ptr<base::DictionaryValue> ReadTestDictionary(
const std::string& filename) {
base::DictionaryValue* dict = NULL;
- FilePath path;
+ base::FilePath path;
if (!chromeos::test_utils::GetTestDataPath(kNetworkComponentDirectory,
filename,
&path)) {
diff --git a/chromeos/tools/onc_validator/onc_validator.cc b/chromeos/tools/onc_validator/onc_validator.cc
index 944bf92..49c31ee 100644
--- a/chromeos/tools/onc_validator/onc_validator.cc
+++ b/chromeos/tools/onc_validator/onc_validator.cc
@@ -83,7 +83,7 @@ void PrintHelp() {
}
scoped_ptr<base::DictionaryValue> ReadDictionary(std::string filename) {
- FilePath path(filename);
+ base::FilePath path(filename);
JSONFileValueSerializer serializer(path);
serializer.set_allow_trailing_comma(true);
diff --git a/net/socket/tcp_client_socket.cc b/net/socket/tcp_client_socket.cc
index 441d4fe..ac13994 100644
--- a/net/socket/tcp_client_socket.cc
+++ b/net/socket/tcp_client_socket.cc
@@ -17,7 +17,7 @@ namespace {
// kernel support. Additionally, this checks system configuration to ensure that
// it's enabled.
bool SystemSupportsTCPFastOpen() {
- static const FilePath::CharType kTCPFastOpenProcFilePath[] =
+ static const base::FilePath::CharType kTCPFastOpenProcFilePath[] =
"/proc/sys/net/ipv4/tcp_fastopen";
std::string system_enabled_tcp_fastopen;
if (!file_util::ReadFileToString(