OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser/quota/quota_manager_proxy.h" | 5 #include "webkit/browser/quota/quota_manager_proxy.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/callback.h" | 9 #include "base/callback.h" |
10 #include "base/sequenced_task_runner.h" | 10 #include "base/sequenced_task_runner.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 base::Bind(&DidGetUsageAndQuota, | 143 base::Bind(&DidGetUsageAndQuota, |
144 make_scoped_refptr(original_task_runner), callback)); | 144 make_scoped_refptr(original_task_runner), callback)); |
145 } | 145 } |
146 | 146 |
147 QuotaManager* QuotaManagerProxy::quota_manager() const { | 147 QuotaManager* QuotaManagerProxy::quota_manager() const { |
148 DCHECK(!io_thread_.get() || io_thread_->BelongsToCurrentThread()); | 148 DCHECK(!io_thread_.get() || io_thread_->BelongsToCurrentThread()); |
149 return manager_; | 149 return manager_; |
150 } | 150 } |
151 | 151 |
152 QuotaManagerProxy::QuotaManagerProxy( | 152 QuotaManagerProxy::QuotaManagerProxy( |
153 QuotaManager* manager, base::SingleThreadTaskRunner* io_thread) | 153 QuotaManager* manager, |
| 154 const scoped_refptr<base::SingleThreadTaskRunner>& io_thread) |
154 : manager_(manager), io_thread_(io_thread) { | 155 : manager_(manager), io_thread_(io_thread) { |
155 } | 156 } |
156 | 157 |
157 QuotaManagerProxy::~QuotaManagerProxy() { | 158 QuotaManagerProxy::~QuotaManagerProxy() { |
158 } | 159 } |
159 | 160 |
160 } // namespace storage | 161 } // namespace storage |
OLD | NEW |