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/indexed_db/indexed_db_context_impl.h" | 5 #include "content/browser/indexed_db/indexed_db_context_impl.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 bool over_quota = additional_bytes > space_available_map_[origin_url]; | 266 bool over_quota = additional_bytes > space_available_map_[origin_url]; |
267 return over_quota; | 267 return over_quota; |
268 } | 268 } |
269 | 269 |
270 bool IndexedDBContextImpl::IsOverQuota(const GURL& origin_url) { | 270 bool IndexedDBContextImpl::IsOverQuota(const GURL& origin_url) { |
271 const int kOneAdditionalByte = 1; | 271 const int kOneAdditionalByte = 1; |
272 return WouldBeOverQuota(origin_url, kOneAdditionalByte); | 272 return WouldBeOverQuota(origin_url, kOneAdditionalByte); |
273 } | 273 } |
274 | 274 |
275 quota::QuotaManagerProxy* IndexedDBContextImpl::quota_manager_proxy() { | 275 quota::QuotaManagerProxy* IndexedDBContextImpl::quota_manager_proxy() { |
276 return quota_manager_proxy_; | 276 return quota_manager_proxy_.get(); |
277 } | 277 } |
278 | 278 |
279 IndexedDBContextImpl::~IndexedDBContextImpl() { | 279 IndexedDBContextImpl::~IndexedDBContextImpl() { |
280 WebKit::WebIDBFactory* factory = idb_factory_.release(); | 280 WebKit::WebIDBFactory* factory = idb_factory_.release(); |
281 if (factory) { | 281 if (factory) { |
282 if (!BrowserThread::DeleteSoon( | 282 if (!BrowserThread::DeleteSoon( |
283 BrowserThread::WEBKIT_DEPRECATED, FROM_HERE, factory)) | 283 BrowserThread::WEBKIT_DEPRECATED, FROM_HERE, factory)) |
284 delete factory; | 284 delete factory; |
285 } | 285 } |
286 | 286 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
410 return origin_set_.get(); | 410 return origin_set_.get(); |
411 } | 411 } |
412 | 412 |
413 void IndexedDBContextImpl::ResetCaches() { | 413 void IndexedDBContextImpl::ResetCaches() { |
414 origin_set_.reset(); | 414 origin_set_.reset(); |
415 origin_size_map_.clear(); | 415 origin_size_map_.clear(); |
416 space_available_map_.clear(); | 416 space_available_map_.clear(); |
417 } | 417 } |
418 | 418 |
419 } // namespace content | 419 } // namespace content |
OLD | NEW |