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

Side by Side Diff: webkit/dom_storage/dom_storage_task_runner.cc

Issue 9572037: Convert uses of int ms to TimeDelta in webkit/appcache and webkit/dom_storage. (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
« no previous file with comments | « webkit/appcache/appcache_response_unittest.cc ('k') | no next file » | 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) 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 "webkit/dom_storage/dom_storage_task_runner.h" 5 #include "webkit/dom_storage/dom_storage_task_runner.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/message_loop_proxy.h" 9 #include "base/message_loop_proxy.h"
10 #include "base/tracked_objects.h" 10 #include "base/tracked_objects.h"
(...skipping 13 matching lines...) Expand all
24 bool DomStorageTaskRunner::PostTask( 24 bool DomStorageTaskRunner::PostTask(
25 const tracked_objects::Location& from_here, 25 const tracked_objects::Location& from_here,
26 const base::Closure& task) { 26 const base::Closure& task) {
27 return message_loop_->PostTask(from_here, task); 27 return message_loop_->PostTask(from_here, task);
28 } 28 }
29 29
30 bool DomStorageTaskRunner::PostDelayedTask( 30 bool DomStorageTaskRunner::PostDelayedTask(
31 const tracked_objects::Location& from_here, 31 const tracked_objects::Location& from_here,
32 const base::Closure& task, 32 const base::Closure& task,
33 base::TimeDelta delay) { 33 base::TimeDelta delay) {
34 return message_loop_->PostDelayedTask(from_here, task, 34 return message_loop_->PostDelayedTask(from_here, task, delay);
35 delay.InMilliseconds());
36 } 35 }
37 36
38 // DomStorageWorkerPoolTaskRunner 37 // DomStorageWorkerPoolTaskRunner
39 38
40 DomStorageWorkerPoolTaskRunner::DomStorageWorkerPoolTaskRunner( 39 DomStorageWorkerPoolTaskRunner::DomStorageWorkerPoolTaskRunner(
41 base::SequencedWorkerPool* sequenced_worker_pool, 40 base::SequencedWorkerPool* sequenced_worker_pool,
42 base::MessageLoopProxy* delayed_task_loop) 41 base::MessageLoopProxy* delayed_task_loop)
43 : DomStorageTaskRunner(delayed_task_loop), 42 : DomStorageTaskRunner(delayed_task_loop),
44 sequenced_worker_pool_(sequenced_worker_pool), 43 sequenced_worker_pool_(sequenced_worker_pool),
45 sequence_token_( 44 sequence_token_(
(...skipping 15 matching lines...) Expand all
61 60
62 bool DomStorageWorkerPoolTaskRunner::PostDelayedTask( 61 bool DomStorageWorkerPoolTaskRunner::PostDelayedTask(
63 const tracked_objects::Location& from_here, 62 const tracked_objects::Location& from_here,
64 const base::Closure& task, 63 const base::Closure& task,
65 base::TimeDelta delay) { 64 base::TimeDelta delay) {
66 // Post a task to call this->PostTask() after the delay. 65 // Post a task to call this->PostTask() after the delay.
67 return message_loop_->PostDelayedTask( 66 return message_loop_->PostDelayedTask(
68 FROM_HERE, 67 FROM_HERE,
69 base::Bind(base::IgnoreResult(&DomStorageWorkerPoolTaskRunner::PostTask), 68 base::Bind(base::IgnoreResult(&DomStorageWorkerPoolTaskRunner::PostTask),
70 this, from_here, task), 69 this, from_here, task),
71 delay.InMilliseconds()); 70 delay);
72 } 71 }
73 72
74 // MockDomStorageTaskRunner 73 // MockDomStorageTaskRunner
75 74
76 MockDomStorageTaskRunner::MockDomStorageTaskRunner( 75 MockDomStorageTaskRunner::MockDomStorageTaskRunner(
77 base::MessageLoopProxy* message_loop) 76 base::MessageLoopProxy* message_loop)
78 : DomStorageTaskRunner(message_loop) { 77 : DomStorageTaskRunner(message_loop) {
79 } 78 }
80 79
81 bool MockDomStorageTaskRunner::PostDelayedTask( 80 bool MockDomStorageTaskRunner::PostDelayedTask(
82 const tracked_objects::Location& from_here, 81 const tracked_objects::Location& from_here,
83 const base::Closure& task, 82 const base::Closure& task,
84 base::TimeDelta delay) { 83 base::TimeDelta delay) {
85 // Don't wait in unit tests. 84 // Don't wait in unit tests.
86 return PostTask(from_here, task); 85 return PostTask(from_here, task);
87 } 86 }
88 87
89 } // namespace dom_storage 88 } // namespace dom_storage
OLDNEW
« no previous file with comments | « webkit/appcache/appcache_response_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698