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

Side by Side Diff: webkit/quota/quota_task.h

Issue 7002024: Implement QuotaTemporaryStorageEvictor. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 7 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
« no previous file with comments | « no previous file | webkit/quota/quota_task.cc » ('j') | webkit/quota/quota_task.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef WEBKIT_QUOTA_QUOTA_TASK_H_ 5 #ifndef WEBKIT_QUOTA_QUOTA_TASK_H_
6 #define WEBKIT_QUOTA_QUOTA_TASK_H_ 6 #define WEBKIT_QUOTA_QUOTA_TASK_H_
7 #pragma once 7 #pragma once
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } 71 }
72 72
73 private: 73 private:
74 friend class base::RefCountedThreadSafe<QuotaThreadTask>; 74 friend class base::RefCountedThreadSafe<QuotaThreadTask>;
75 friend class QuotaTaskObserver; 75 friend class QuotaTaskObserver;
76 void CallRunOnTargetThread(); 76 void CallRunOnTargetThread();
77 77
78 scoped_refptr<base::MessageLoopProxy> target_message_loop_; 78 scoped_refptr<base::MessageLoopProxy> target_message_loop_;
79 }; 79 };
80 80
81 // For delayed tasks that post tasks to the other thread.
82 class QuotaDelayedThreadTask : public QuotaThreadTask {
83 public:
84 QuotaDelayedThreadTask(
85 QuotaTaskObserver* observer,
86 scoped_refptr<base::MessageLoopProxy> target_message_loop
87 int64 delay_ms);
88
89 protected:
90 virtual void Run() OVERRIDE;
91
92 private:
93 int64 delay_ms_;
94 };
95
81 class QuotaTaskObserver { 96 class QuotaTaskObserver {
82 public: 97 public:
83 virtual ~QuotaTaskObserver(); 98 virtual ~QuotaTaskObserver();
84 99
85 protected: 100 protected:
86 friend class QuotaTask; 101 friend class QuotaTask;
87 friend class QuotaThreadTask; 102 friend class QuotaThreadTask;
88 103
89 QuotaTaskObserver(); 104 QuotaTaskObserver();
90 void RegisterTask(QuotaTask* task); 105 void RegisterTask(QuotaTask* task);
91 void UnregisterTask(QuotaTask* task); 106 void UnregisterTask(QuotaTask* task);
92 107
93 typedef std::set<QuotaTask*> TaskSet; 108 typedef std::set<QuotaTask*> TaskSet;
94 TaskSet running_quota_tasks_; 109 TaskSet running_quota_tasks_;
95 }; 110 };
96 111
97 } 112 }
98 113
99 #endif // WEBKIT_QUOTA_QUOTA_TASK_H_ 114 #endif // WEBKIT_QUOTA_QUOTA_TASK_H_
OLDNEW
« no previous file with comments | « no previous file | webkit/quota/quota_task.cc » ('j') | webkit/quota/quota_task.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698