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

Side by Side Diff: content/browser/renderer_host/database_message_filter.cc

Issue 9572035: Convert uses of int ms to TimeDelta in content/browser, ipc, and webkit/plugins. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/renderer_host/database_message_filter.h" 5 #include "content/browser/renderer_host/database_message_filter.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/platform_file.h" 10 #include "base/platform_file.h"
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 } else { 203 } else {
204 error_code = VfsBackend::DeleteFile(db_file, sync_dir); 204 error_code = VfsBackend::DeleteFile(db_file, sync_dir);
205 } 205 }
206 206
207 if ((error_code == SQLITE_IOERR_DELETE) && reschedule_count) { 207 if ((error_code == SQLITE_IOERR_DELETE) && reschedule_count) {
208 // If the file could not be deleted, try again. 208 // If the file could not be deleted, try again.
209 BrowserThread::PostDelayedTask( 209 BrowserThread::PostDelayedTask(
210 BrowserThread::FILE, FROM_HERE, 210 BrowserThread::FILE, FROM_HERE,
211 base::Bind(&DatabaseMessageFilter::DatabaseDeleteFile, this, 211 base::Bind(&DatabaseMessageFilter::DatabaseDeleteFile, this,
212 vfs_file_name, sync_dir, reply_msg, reschedule_count - 1), 212 vfs_file_name, sync_dir, reply_msg, reschedule_count - 1),
213 kDelayDeleteRetryMs); 213 base::TimeDelta::FromMilliseconds(kDelayDeleteRetryMs));
214 return; 214 return;
215 } 215 }
216 } 216 }
217 217
218 DatabaseHostMsg_DeleteFile::WriteReplyParams(reply_msg, error_code); 218 DatabaseHostMsg_DeleteFile::WriteReplyParams(reply_msg, error_code);
219 Send(reply_msg); 219 Send(reply_msg);
220 } 220 }
221 221
222 void DatabaseMessageFilter::OnDatabaseGetFileAttributes( 222 void DatabaseMessageFilter::OnDatabaseGetFileAttributes(
223 const string16& vfs_file_name, 223 const string16& vfs_file_name,
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 database_size)); 340 database_size));
341 } 341 }
342 } 342 }
343 343
344 void DatabaseMessageFilter::OnDatabaseScheduledForDeletion( 344 void DatabaseMessageFilter::OnDatabaseScheduledForDeletion(
345 const string16& origin_identifier, 345 const string16& origin_identifier,
346 const string16& database_name) { 346 const string16& database_name) {
347 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 347 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
348 Send(new DatabaseMsg_CloseImmediately(origin_identifier, database_name)); 348 Send(new DatabaseMsg_CloseImmediately(origin_identifier, database_name));
349 } 349 }
OLDNEW
« no previous file with comments | « content/browser/plugin_data_remover_impl.cc ('k') | content/browser/renderer_host/render_widget_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698