Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5009)

Unified Diff: chrome/common/extensions/extension_file_util.cc

Issue 18286004: Move PathExists to base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/background_info.cc ('k') | chrome/common/extensions/extension_l10n_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension_file_util.cc
diff --git a/chrome/common/extensions/extension_file_util.cc b/chrome/common/extensions/extension_file_util.cc
index 188abc41cf9bfbb4a593fd9e17fd3a712ae9cc0b..37137fdaa530c197198c9c9b9e386fee4341476b 100644
--- a/chrome/common/extensions/extension_file_util.cc
+++ b/chrome/common/extensions/extension_file_util.cc
@@ -72,7 +72,7 @@ base::FilePath InstallExtension(const base::FilePath& unpacked_source_dir,
base::FilePath version_dir;
// Create the extension directory if it doesn't exist already.
- if (!file_util::PathExists(extension_dir)) {
+ if (!base::PathExists(extension_dir)) {
if (!file_util::CreateDirectory(extension_dir))
return base::FilePath();
}
@@ -99,7 +99,7 @@ base::FilePath InstallExtension(const base::FilePath& unpacked_source_dir,
for (int i = 0; i < kMaxAttempts; ++i) {
base::FilePath candidate = extension_dir.AppendASCII(
base::StringPrintf("%s_%u", version.c_str(), i));
- if (!file_util::PathExists(candidate)) {
+ if (!base::PathExists(candidate)) {
version_dir = candidate;
break;
}
@@ -170,7 +170,7 @@ base::DictionaryValue* LoadManifest(const base::FilePath& extension_path,
std::string* error) {
base::FilePath manifest_path =
extension_path.Append(extensions::kManifestFilename);
- if (!file_util::PathExists(manifest_path)) {
+ if (!base::PathExists(manifest_path)) {
*error = l10n_util::GetStringUTF8(IDS_EXTENSION_MANIFEST_UNREADABLE);
return NULL;
}
@@ -229,7 +229,7 @@ std::vector<base::FilePath> FindPrivateKeyFiles(
bool ValidateFilePath(const base::FilePath& path) {
int64 size = 0;
- if (!file_util::PathExists(path) ||
+ if (!base::PathExists(path) ||
!file_util::GetFileSize(path, &size) ||
size == 0) {
return false;
@@ -409,7 +409,7 @@ extensions::MessageBundle* LoadMessageBundle(
error->clear();
// Load locale information if available.
base::FilePath locale_path = extension_path.Append(extensions::kLocaleFolder);
- if (!file_util::PathExists(locale_path))
+ if (!base::PathExists(locale_path))
return NULL;
std::set<std::string> locales;
@@ -529,7 +529,7 @@ base::FilePath ExtensionResourceURLToFilePath(const GURL& url,
return base::FilePath();
base::FilePath path = root.AppendASCII(host).Append(relative_path);
- if (!file_util::PathExists(path))
+ if (!base::PathExists(path))
return base::FilePath();
path = base::MakeAbsoluteFilePath(path);
if (path.empty() || !root.IsParent(path))
@@ -548,7 +548,7 @@ base::FilePath GetInstallTempDir(const base::FilePath& extensions_dir) {
// This guarantees it is on the same file system as the extension's eventual
// install target.
base::FilePath temp_path = extensions_dir.Append(kTempDirectoryName);
- if (file_util::PathExists(temp_path)) {
+ if (base::PathExists(temp_path)) {
if (!file_util::DirectoryExists(temp_path)) {
DLOG(WARNING) << "Not a directory: " << temp_path.value();
return base::FilePath();
« no previous file with comments | « chrome/common/extensions/background_info.cc ('k') | chrome/common/extensions/extension_l10n_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698