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

Side by Side Diff: chrome/browser/page_cycler/page_cycler.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 "chrome/browser/page_cycler/page_cycler.h" 5 #include "chrome/browser/page_cycler/page_cycler.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/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 } else { 215 } else {
216 file_util::WriteFile(stats_file_, output.c_str(), output.size()); 216 file_util::WriteFile(stats_file_, output.c_str(), output.size());
217 } 217 }
218 } 218 }
219 if (!errors_file_.empty()) { 219 if (!errors_file_.empty()) {
220 if (!error_.empty()) { 220 if (!error_.empty()) {
221 file_util::WriteFile(errors_file_, UTF16ToUTF8(error_).c_str(), 221 file_util::WriteFile(errors_file_, UTF16ToUTF8(error_).c_str(),
222 error_.size()); 222 error_.size());
223 } else if (file_util::PathExists(errors_file_)) { 223 } else if (file_util::PathExists(errors_file_)) {
224 // If there is an old error file, delete it to avoid confusion. 224 // If there is an old error file, delete it to avoid confusion.
225 file_util::Delete(errors_file_, false); 225 base::Delete(errors_file_, false);
226 } 226 }
227 } 227 }
228 if (aborted_) { 228 if (aborted_) {
229 content::BrowserThread::PostTask(content::BrowserThread::UI, 229 content::BrowserThread::PostTask(content::BrowserThread::UI,
230 FROM_HERE, 230 FROM_HERE,
231 base::Bind(&PageCycler::Abort, this)); 231 base::Bind(&PageCycler::Abort, this));
232 } else { 232 } else {
233 content::BrowserThread::PostTask(content::BrowserThread::UI, 233 content::BrowserThread::PostTask(content::BrowserThread::UI,
234 FROM_HERE, 234 FROM_HERE,
235 base::Bind(&PageCycler::Finish, this)); 235 base::Bind(&PageCycler::Finish, this));
(...skipping 23 matching lines...) Expand all
259 aborted_ = true; 259 aborted_ = true;
260 error_.append(ASCIIToUTF16( 260 error_.append(ASCIIToUTF16(
261 "Browser was closed before the run was completed.")); 261 "Browser was closed before the run was completed."));
262 DLOG(WARNING) << 262 DLOG(WARNING) <<
263 "Page Cycler: browser was closed before the run was completed."; 263 "Page Cycler: browser was closed before the run was completed.";
264 content::BrowserThread::PostBlockingPoolTask( 264 content::BrowserThread::PostBlockingPoolTask(
265 FROM_HERE, 265 FROM_HERE,
266 base::Bind(&PageCycler::PrepareResultsOnBackgroundThread, this)); 266 base::Bind(&PageCycler::PrepareResultsOnBackgroundThread, this));
267 } 267 }
268 } 268 }
OLDNEW
« no previous file with comments | « chrome/browser/net/url_fixer_upper_unittest.cc ('k') | chrome/browser/pepper_flash_settings_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698