OLD | NEW |
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 "webkit/fileapi/file_system_quota_util.h" | 5 #include "webkit/fileapi/file_system_quota_util.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/location.h" |
8 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
9 | 10 |
10 namespace fileapi { | 11 namespace fileapi { |
11 | 12 |
12 void FileSystemQuotaUtil::Proxy::UpdateOriginUsage( | 13 void FileSystemQuotaUtil::Proxy::UpdateOriginUsage( |
13 quota::QuotaManagerProxy* proxy, const GURL& origin_url, | 14 quota::QuotaManagerProxy* proxy, const GURL& origin_url, |
14 fileapi::FileSystemType type, int64 delta) { | 15 fileapi::FileSystemType type, int64 delta) { |
15 if (!file_thread_->BelongsToCurrentThread()) { | 16 if (!file_thread_->BelongsToCurrentThread()) { |
16 file_thread_->PostTask(FROM_HERE, NewRunnableMethod( | 17 file_thread_->PostTask(FROM_HERE, NewRunnableMethod( |
17 this, &Proxy::UpdateOriginUsage, proxy, origin_url, type, delta)); | 18 this, &Proxy::UpdateOriginUsage, proxy, origin_url, type, delta)); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 57 |
57 FileSystemQuotaUtil::FileSystemQuotaUtil(base::MessageLoopProxy* file_thread) | 58 FileSystemQuotaUtil::FileSystemQuotaUtil(base::MessageLoopProxy* file_thread) |
58 : proxy_(new Proxy(ALLOW_THIS_IN_INITIALIZER_LIST(this), file_thread)) { | 59 : proxy_(new Proxy(ALLOW_THIS_IN_INITIALIZER_LIST(this), file_thread)) { |
59 } | 60 } |
60 | 61 |
61 FileSystemQuotaUtil::~FileSystemQuotaUtil() { | 62 FileSystemQuotaUtil::~FileSystemQuotaUtil() { |
62 proxy_->quota_util_ = NULL; | 63 proxy_->quota_util_ = NULL; |
63 } | 64 } |
64 | 65 |
65 } // namespace fileapi | 66 } // namespace fileapi |
OLD | NEW |