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

Unified Diff: chrome/browser/chromeos/extensions/wallpaper_private_api.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
Index: chrome/browser/chromeos/extensions/wallpaper_private_api.cc
diff --git a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
index cb4acbb5c4523e38dcc5fd5119e0b6498985ea3f..c1c30009a13e268baa38b36f5b04b404b9f872cc 100644
--- a/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
+++ b/chrome/browser/chromeos/extensions/wallpaper_private_api.cc
@@ -83,7 +83,7 @@ bool SaveData(int key, const std::string& file_name, const std::string& data) {
}
base::FilePath file_path = data_dir.Append(file_name);
- return file_util::PathExists(file_path) ||
+ return base::PathExists(file_path) ||
(file_util::WriteFile(file_path, data.c_str(),
data.size()) != -1);
}
@@ -98,7 +98,7 @@ bool GetData(const base::FilePath& path, std::string* data) {
!file_util::CreateDirectory(data_dir))
return false;
- return !file_util::PathExists(path) ||
+ return !base::PathExists(path) ||
file_util::ReadFileToString(path, data);
}
@@ -382,10 +382,10 @@ void WallpaperPrivateSetWallpaperIfExistsFunction::
std::string data;
base::FilePath path = file_path;
- if (!file_util::PathExists(file_path))
+ if (!base::PathExists(file_path))
path = fallback_path;
- if (file_util::PathExists(path) &&
+ if (base::PathExists(path) &&
file_util::ReadFileToString(path, &data)) {
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
base::Bind(&WallpaperPrivateSetWallpaperIfExistsFunction::StartDecode,
@@ -492,7 +492,7 @@ void WallpaperPrivateSetWallpaperFunction::SaveToFile() {
CHECK(PathService::Get(chrome::DIR_CHROMEOS_WALLPAPERS, &wallpaper_dir));
base::FilePath file_path = wallpaper_dir.Append(
file_name).InsertBeforeExtension(chromeos::kSmallWallpaperSuffix);
- if (file_util::PathExists(file_path))
+ if (base::PathExists(file_path))
return;
// Generates and saves small resolution wallpaper. Uses CENTER_CROPPED to
// maintain the aspect ratio after resize.
@@ -628,7 +628,7 @@ void WallpaperPrivateSetCustomWallpaperFunction::GenerateThumbnail(
DCHECK(BrowserThread::GetBlockingPool()->IsRunningSequenceOnCurrentThread(
sequence_token_));
chromeos::UserImage wallpaper(*image.get());
- if (!file_util::PathExists(thumbnail_path.DirName()))
+ if (!base::PathExists(thumbnail_path.DirName()))
file_util::CreateDirectory(thumbnail_path.DirName());
scoped_refptr<base::RefCountedBytes> data;

Powered by Google App Engine
This is Rietveld 408576698