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

Side by Side Diff: net/disk_cache/simple/simple_synchronous_entry.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/disk_cache/simple/simple_index_file.cc ('k') | net/http/http_cache.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/disk_cache/simple/simple_synchronous_entry.h" 5 #include "net/disk_cache/simple/simple_synchronous_entry.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cstring> 8 #include <cstring>
9 #include <functional> 9 #include <functional>
10 #include <limits> 10 #include <limits>
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 178
179 // TODO(gavinp): Move this function to its correct location in this .cc file. 179 // TODO(gavinp): Move this function to its correct location in this .cc file.
180 // static 180 // static
181 bool SimpleSynchronousEntry::DeleteFilesForEntryHash( 181 bool SimpleSynchronousEntry::DeleteFilesForEntryHash(
182 const FilePath& path, 182 const FilePath& path,
183 const uint64 entry_hash) { 183 const uint64 entry_hash) {
184 bool result = true; 184 bool result = true;
185 for (int i = 0; i < kSimpleEntryFileCount; ++i) { 185 for (int i = 0; i < kSimpleEntryFileCount; ++i) {
186 FilePath to_delete = path.AppendASCII( 186 FilePath to_delete = path.AppendASCII(
187 GetFilenameFromEntryHashAndIndex(entry_hash, i)); 187 GetFilenameFromEntryHashAndIndex(entry_hash, i));
188 if (!base::Delete(to_delete, false)) { 188 if (!base::DeleteFile(to_delete, false)) {
189 result = false; 189 result = false;
190 DLOG(ERROR) << "Could not delete " << to_delete.MaybeAsASCII(); 190 DLOG(ERROR) << "Could not delete " << to_delete.MaybeAsASCII();
191 } 191 }
192 } 192 }
193 return result; 193 return result;
194 } 194 }
195 195
196 // static 196 // static
197 void SimpleSynchronousEntry::DoomEntry( 197 void SimpleSynchronousEntry::DoomEntry(
198 const FilePath& path, 198 const FilePath& path,
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 initialized_ = true; 548 initialized_ = true;
549 return net::OK; 549 return net::OK;
550 } 550 }
551 551
552 void SimpleSynchronousEntry::Doom() { 552 void SimpleSynchronousEntry::Doom() {
553 // TODO(gavinp): Consider if we should guard against redundant Doom() calls. 553 // TODO(gavinp): Consider if we should guard against redundant Doom() calls.
554 DeleteFilesForEntryHash(path_, entry_hash_); 554 DeleteFilesForEntryHash(path_, entry_hash_);
555 } 555 }
556 556
557 } // namespace disk_cache 557 } // namespace disk_cache
OLDNEW
« no previous file with comments | « net/disk_cache/simple/simple_index_file.cc ('k') | net/http/http_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698