OLD | NEW |
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 "content/browser/in_process_webkit/indexed_db_quota_client.h" | 5 #include "content/browser/in_process_webkit/indexed_db_quota_client.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 DCHECK(!callback.is_null()); | 92 DCHECK(!callback.is_null()); |
93 DCHECK(indexed_db_context_.get()); | 93 DCHECK(indexed_db_context_.get()); |
94 | 94 |
95 // IndexedDB is in the temp namespace for now. | 95 // IndexedDB is in the temp namespace for now. |
96 if (type != quota::kStorageTypeTemporary) { | 96 if (type != quota::kStorageTypeTemporary) { |
97 callback.Run(0); | 97 callback.Run(0); |
98 return; | 98 return; |
99 } | 99 } |
100 | 100 |
101 base::PostTaskAndReplyWithResult( | 101 base::PostTaskAndReplyWithResult( |
102 webkit_thread_message_loop_, | 102 webkit_thread_message_loop_.get(), |
103 FROM_HERE, | 103 FROM_HERE, |
104 base::Bind(&GetOriginUsageOnWebKitThread, | 104 base::Bind(&GetOriginUsageOnWebKitThread, |
105 indexed_db_context_, | 105 indexed_db_context_, |
106 origin_url), | 106 origin_url), |
107 callback); | 107 callback); |
108 } | 108 } |
109 | 109 |
110 void IndexedDBQuotaClient::GetOriginsForType( | 110 void IndexedDBQuotaClient::GetOriginsForType( |
111 quota::StorageType type, | 111 quota::StorageType type, |
112 const GetOriginsCallback& callback) { | 112 const GetOriginsCallback& callback) { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 void IndexedDBQuotaClient::DeleteOriginData( | 160 void IndexedDBQuotaClient::DeleteOriginData( |
161 const GURL& origin, | 161 const GURL& origin, |
162 quota::StorageType type, | 162 quota::StorageType type, |
163 const DeletionCallback& callback) { | 163 const DeletionCallback& callback) { |
164 if (type != quota::kStorageTypeTemporary) { | 164 if (type != quota::kStorageTypeTemporary) { |
165 callback.Run(quota::kQuotaErrorNotSupported); | 165 callback.Run(quota::kQuotaErrorNotSupported); |
166 return; | 166 return; |
167 } | 167 } |
168 | 168 |
169 base::PostTaskAndReplyWithResult( | 169 base::PostTaskAndReplyWithResult( |
170 webkit_thread_message_loop_, | 170 webkit_thread_message_loop_.get(), |
171 FROM_HERE, | 171 FROM_HERE, |
172 base::Bind(&DeleteOriginDataOnWebKitThread, | 172 base::Bind(&DeleteOriginDataOnWebKitThread, |
173 indexed_db_context_, | 173 indexed_db_context_, |
174 origin), | 174 origin), |
175 callback); | 175 callback); |
176 } | 176 } |
177 | 177 |
178 } // namespace content | 178 } // namespace content |
OLD | NEW |