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

Side by Side Diff: content/browser/download/base_file.cc

Issue 16950028: Move file_util::Delete to the 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/browser/download/base_file.h" 5 #include "content/browser/download/base_file.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 191 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
192 DCHECK(!detached_); 192 DCHECK(!detached_);
193 193
194 bound_net_log_.AddEvent(net::NetLog::TYPE_CANCELLED); 194 bound_net_log_.AddEvent(net::NetLog::TYPE_CANCELLED);
195 195
196 Close(); 196 Close();
197 197
198 if (!full_path_.empty()) { 198 if (!full_path_.empty()) {
199 bound_net_log_.AddEvent(net::NetLog::TYPE_DOWNLOAD_FILE_DELETED); 199 bound_net_log_.AddEvent(net::NetLog::TYPE_DOWNLOAD_FILE_DELETED);
200 200
201 file_util::Delete(full_path_, false); 201 base::Delete(full_path_, false);
202 } 202 }
203 } 203 }
204 204
205 void BaseFile::Finish() { 205 void BaseFile::Finish() {
206 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 206 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
207 207
208 if (calculate_hash_) 208 if (calculate_hash_)
209 secure_hash_->Finish(sha256_hash_, kSha256HashLen); 209 secure_hash_->Finish(sha256_hash_, kSha256HashLen);
210 210
211 Close(); 211 Close();
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 const char* operation, 358 const char* operation,
359 int os_error, 359 int os_error,
360 DownloadInterruptReason reason) { 360 DownloadInterruptReason reason) {
361 bound_net_log_.AddEvent( 361 bound_net_log_.AddEvent(
362 net::NetLog::TYPE_DOWNLOAD_FILE_ERROR, 362 net::NetLog::TYPE_DOWNLOAD_FILE_ERROR,
363 base::Bind(&FileInterruptedNetLogCallback, operation, os_error, reason)); 363 base::Bind(&FileInterruptedNetLogCallback, operation, os_error, reason));
364 return reason; 364 return reason;
365 } 365 }
366 366
367 } // namespace content 367 } // namespace content
OLDNEW
« no previous file with comments | « components/visitedlink/test/visitedlink_perftest.cc ('k') | content/browser/download/download_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698