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

Unified Diff: chrome/browser/policy/cloud/resource_cache.cc

Issue 18584011: Rename base::Delete to base::DeleteFile (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/policy/cloud/resource_cache.cc
diff --git a/chrome/browser/policy/cloud/resource_cache.cc b/chrome/browser/policy/cloud/resource_cache.cc
index 82aea6dbff84e2b3fb3e45525f33f520656f3044..5523782f5008760e7d2c591ad70160d33bc2ba98 100644
--- a/chrome/browser/policy/cloud/resource_cache.cc
+++ b/chrome/browser/policy/cloud/resource_cache.cc
@@ -62,7 +62,7 @@ bool ResourceCache::Store(const std::string& key,
// to protect against such races, especially as the cache is cross-platform
// and therefore cannot use any POSIX-only tricks.
return VerifyKeyPathAndGetSubkeyPath(key, true, subkey, &subkey_path) &&
- base::Delete(subkey_path, false) &&
+ base::DeleteFile(subkey_path, false) &&
file_util::WriteFile(subkey_path, data.data(), data.size());
}
@@ -109,11 +109,11 @@ void ResourceCache::Delete(const std::string& key, const std::string& subkey) {
DCHECK(CalledOnValidThread());
base::FilePath subkey_path;
if (VerifyKeyPathAndGetSubkeyPath(key, false, subkey, &subkey_path))
- base::Delete(subkey_path, false);
+ base::DeleteFile(subkey_path, false);
// Delete() does nothing if the directory given to it is not empty. Hence, the
// call below deletes the directory representing |key| if its last subkey was
// just removed and does nothing otherwise.
- base::Delete(subkey_path.DirName(), false);
+ base::DeleteFile(subkey_path.DirName(), false);
}
void ResourceCache::PurgeOtherSubkeys(
@@ -138,12 +138,12 @@ void ResourceCache::PurgeOtherSubkeys(
path = enumerator.Next()) {
const std::string name(path.BaseName().MaybeAsASCII());
if (encoded_subkeys_to_keep.find(name) == encoded_subkeys_to_keep.end())
- base::Delete(path, false);
+ base::DeleteFile(path, false);
}
// Delete() does nothing if the directory given to it is not empty. Hence, the
// call below deletes the directory representing |key| if all of its subkeys
// were just removed and does nothing otherwise.
- base::Delete(key_path, false);
+ base::DeleteFile(key_path, false);
}
bool ResourceCache::VerifyKeyPath(const std::string& key,
« no previous file with comments | « chrome/browser/pepper_flash_settings_manager.cc ('k') | chrome/browser/policy/cloud/user_cloud_policy_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698