| 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 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONTEXT_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONTEXT_IMPL_H_ |
| 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONTEXT_IMPL_H_ | 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONTEXT_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 // IndexedDBContext implementation: | 59 // IndexedDBContext implementation: |
| 60 virtual std::vector<GURL> GetAllOrigins() OVERRIDE; | 60 virtual std::vector<GURL> GetAllOrigins() OVERRIDE; |
| 61 virtual std::vector<IndexedDBInfo> GetAllOriginsInfo() OVERRIDE; | 61 virtual std::vector<IndexedDBInfo> GetAllOriginsInfo() OVERRIDE; |
| 62 virtual int64 GetOriginDiskUsage(const GURL& origin_url) OVERRIDE; | 62 virtual int64 GetOriginDiskUsage(const GURL& origin_url) OVERRIDE; |
| 63 virtual base::Time GetOriginLastModified(const GURL& origin_url) OVERRIDE; | 63 virtual base::Time GetOriginLastModified(const GURL& origin_url) OVERRIDE; |
| 64 virtual void DeleteForOrigin(const GURL& origin_url) OVERRIDE; | 64 virtual void DeleteForOrigin(const GURL& origin_url) OVERRIDE; |
| 65 virtual base::FilePath GetFilePathForTesting(const string16& origin_id) const | 65 virtual base::FilePath GetFilePathForTesting(const string16& origin_id) const |
| 66 OVERRIDE; | 66 OVERRIDE; |
| 67 | 67 |
| 68 // Methods called by IndexedDBDispatcherHost for quota support. | 68 // Methods called by IndexedDBDispatcherHost for quota support. |
| 69 void ConnectionOpened(const GURL& origin_url, WebKit::WebIDBDatabase* db); | 69 void ConnectionOpened(const GURL& origin_url, WebKit::WebIDBDatabase*); |
| 70 void ConnectionClosed(const GURL& origin_url, WebKit::WebIDBDatabase* db); | 70 void ConnectionClosed(const GURL& origin_url, WebKit::WebIDBDatabase*); |
| 71 void TransactionComplete(const GURL& origin_url); | 71 void TransactionComplete(const GURL& origin_url); |
| 72 bool WouldBeOverQuota(const GURL& origin_url, int64 additional_bytes); | 72 bool WouldBeOverQuota(const GURL& origin_url, int64 additional_bytes); |
| 73 bool IsOverQuota(const GURL& origin_url); | 73 bool IsOverQuota(const GURL& origin_url); |
| 74 | 74 |
| 75 quota::QuotaManagerProxy* quota_manager_proxy(); | 75 quota::QuotaManagerProxy* quota_manager_proxy(); |
| 76 | 76 |
| 77 void ForceClose(const GURL& origin_url); | 77 void ForceClose(const GURL& origin_url); |
| 78 base::FilePath GetFilePath(const GURL& origin_url); | 78 base::FilePath GetFilePath(const GURL& origin_url); |
| 79 base::FilePath data_path() const { return data_path_; } | 79 base::FilePath data_path() const { return data_path_; } |
| 80 bool IsInOriginSet(const GURL& origin_url) { | 80 bool IsInOriginSet(const GURL& origin_url) { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 OriginToSizeMap space_available_map_; | 132 OriginToSizeMap space_available_map_; |
| 133 typedef std::set<WebKit::WebIDBDatabase*> ConnectionSet; | 133 typedef std::set<WebKit::WebIDBDatabase*> ConnectionSet; |
| 134 std::map<GURL, ConnectionSet> connections_; | 134 std::map<GURL, ConnectionSet> connections_; |
| 135 | 135 |
| 136 DISALLOW_COPY_AND_ASSIGN(IndexedDBContextImpl); | 136 DISALLOW_COPY_AND_ASSIGN(IndexedDBContextImpl); |
| 137 }; | 137 }; |
| 138 | 138 |
| 139 } // namespace content | 139 } // namespace content |
| 140 | 140 |
| 141 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONTEXT_IMPL_H_ | 141 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CONTEXT_IMPL_H_ |
| OLD | NEW |