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

Side by Side Diff: chrome/browser/nacl_host/nacl_browser.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
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 "chrome/browser/nacl_host/nacl_browser.h" 5 #include "chrome/browser/nacl_host/nacl_browser.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 91 }
92 } 92 }
93 93
94 void WriteCache(const base::FilePath& filename, const Pickle* pickle) { 94 void WriteCache(const base::FilePath& filename, const Pickle* pickle) {
95 file_util::WriteFile(filename, static_cast<const char*>(pickle->data()), 95 file_util::WriteFile(filename, static_cast<const char*>(pickle->data()),
96 pickle->size()); 96 pickle->size());
97 } 97 }
98 98
99 void RemoveCache(const base::FilePath& filename, 99 void RemoveCache(const base::FilePath& filename,
100 const base::Closure& callback) { 100 const base::Closure& callback) {
101 base::Delete(filename, false); 101 base::DeleteFile(filename, false);
102 content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE, 102 content::BrowserThread::PostTask(content::BrowserThread::IO, FROM_HERE,
103 callback); 103 callback);
104 } 104 }
105 105
106 void LogCacheQuery(ValidationCacheStatus status) { 106 void LogCacheQuery(ValidationCacheStatus status) {
107 UMA_HISTOGRAM_ENUMERATION("NaCl.ValidationCache.Query", status, CACHE_MAX); 107 UMA_HISTOGRAM_ENUMERATION("NaCl.ValidationCache.Query", status, CACHE_MAX);
108 } 108 }
109 109
110 void LogCacheSet(ValidationCacheStatus status) { 110 void LogCacheSet(ValidationCacheStatus status) {
111 // Bucket zero is reserved for future use. 111 // Bucket zero is reserved for future use.
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 // because it can degrade the responsiveness of the browser. 569 // because it can degrade the responsiveness of the browser.
570 // The task is sequenced so that multiple writes happen in order. 570 // The task is sequenced so that multiple writes happen in order.
571 content::BrowserThread::PostBlockingPoolSequencedTask( 571 content::BrowserThread::PostBlockingPoolSequencedTask(
572 kValidationCacheSequenceName, 572 kValidationCacheSequenceName,
573 FROM_HERE, 573 FROM_HERE,
574 base::Bind(WriteCache, validation_cache_file_path_, 574 base::Bind(WriteCache, validation_cache_file_path_,
575 base::Owned(pickle))); 575 base::Owned(pickle)));
576 } 576 }
577 validation_cache_is_modified_ = false; 577 validation_cache_is_modified_ = false;
578 } 578 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698