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

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

Issue 9703053: Remove old Sleep and PostDelayedTask interfaces that use int ms instead of TimeDelta. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Remove old PDT interface in webkit/dom_storage. 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) 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 #ifndef WEBKIT_DOM_STORAGE_DOM_STORAGE_TASK_RUNNER_ 5 #ifndef WEBKIT_DOM_STORAGE_DOM_STORAGE_TASK_RUNNER_
6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_TASK_RUNNER_ 6 #define WEBKIT_DOM_STORAGE_DOM_STORAGE_TASK_RUNNER_
7 #pragma once 7 #pragma once
8 8
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/sequenced_task_runner.h" 10 #include "base/sequenced_task_runner.h"
(...skipping 16 matching lines...) Expand all
27 27
28 // The PostTask() method, defined by TaskRunner, schedules a task 28 // The PostTask() method, defined by TaskRunner, schedules a task
29 // to run immediately. 29 // to run immediately.
30 30
31 // Schedules a task to be run after a delay. 31 // Schedules a task to be run after a delay.
32 virtual bool PostDelayedTask( 32 virtual bool PostDelayedTask(
33 const tracked_objects::Location& from_here, 33 const tracked_objects::Location& from_here,
34 const base::Closure& task, 34 const base::Closure& task,
35 base::TimeDelta delay) OVERRIDE; 35 base::TimeDelta delay) OVERRIDE;
36 36
37 // DEPRECATED: Only here because base::TaskRunner requires it, implemented
38 // by calling the virtual PostDelayedTask(..., TimeDelta) variant.
39 virtual bool PostDelayedTask(
40 const tracked_objects::Location& from_here,
41 const base::Closure& task,
42 int64 delay_ms) OVERRIDE;
43
44 // Only here because base::TaskRunner requires it, the return 37 // Only here because base::TaskRunner requires it, the return
45 // value is hard coded to true. 38 // value is hard coded to true.
46 virtual bool RunsTasksOnCurrentThread() const OVERRIDE; 39 virtual bool RunsTasksOnCurrentThread() const OVERRIDE;
47 40
48 // SequencedTaskRunner overrides, these are implemented in 41 // SequencedTaskRunner overrides, these are implemented in
49 // terms of PostDelayedTask and the latter is similarly deprecated. 42 // terms of PostDelayedTask
Sergey Ulanov 2012/03/15 19:58:50 nit: add period at then end of the sentence
50 virtual bool PostNonNestableDelayedTask( 43 virtual bool PostNonNestableDelayedTask(
51 const tracked_objects::Location& from_here, 44 const tracked_objects::Location& from_here,
52 const base::Closure& task, 45 const base::Closure& task,
53 base::TimeDelta delay) OVERRIDE; 46 base::TimeDelta delay) OVERRIDE;
54 virtual bool PostNonNestableDelayedTask(
55 const tracked_objects::Location& from_here,
56 const base::Closure& task,
57 int64 delay_ms) OVERRIDE;
58 47
59 protected: 48 protected:
60 const scoped_refptr<base::MessageLoopProxy> message_loop_; 49 const scoped_refptr<base::MessageLoopProxy> message_loop_;
61 }; 50 };
62 51
63 // A derived class that utlizes the SequenceWorkerPool under a 52 // A derived class that utlizes the SequenceWorkerPool under a
64 // dom_storage specific SequenceToken. The MessageLoopProxy 53 // dom_storage specific SequenceToken. The MessageLoopProxy
65 // is used to delay scheduling on the worker pool. 54 // is used to delay scheduling on the worker pool.
66 class DomStorageWorkerPoolTaskRunner : public DomStorageTaskRunner { 55 class DomStorageWorkerPoolTaskRunner : public DomStorageTaskRunner {
67 public: 56 public:
(...skipping 26 matching lines...) Expand all
94 83
95 virtual bool PostDelayedTask( 84 virtual bool PostDelayedTask(
96 const tracked_objects::Location& from_here, 85 const tracked_objects::Location& from_here,
97 const base::Closure& task, 86 const base::Closure& task,
98 base::TimeDelta delay) OVERRIDE; 87 base::TimeDelta delay) OVERRIDE;
99 }; 88 };
100 89
101 } // namespace dom_storage 90 } // namespace dom_storage
102 91
103 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_TASK_RUNNER_ 92 #endif // WEBKIT_DOM_STORAGE_DOM_STORAGE_TASK_RUNNER_
OLDNEW
« no previous file with comments | « remoting/host/it2me_host_user_interface.cc ('k') | webkit/dom_storage/dom_storage_task_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698