| 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 #ifndef CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_CONTEXT_H_ | 5 #ifndef CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_CONTEXT_H_ |
| 6 #define CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_CONTEXT_H_ | 6 #define CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_CONTEXT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 // The indexed db file extension. | 52 // The indexed db file extension. |
| 53 static const FilePath::CharType kIndexedDBExtension[]; | 53 static const FilePath::CharType kIndexedDBExtension[]; |
| 54 | 54 |
| 55 void set_clear_local_state_on_exit(bool clear_local_state) { | 55 void set_clear_local_state_on_exit(bool clear_local_state) { |
| 56 clear_local_state_on_exit_ = clear_local_state; | 56 clear_local_state_on_exit_ = clear_local_state; |
| 57 } | 57 } |
| 58 | 58 |
| 59 // Deletes all indexed db files for the given origin. | 59 // Deletes all indexed db files for the given origin. |
| 60 void DeleteIndexedDBForOrigin(const GURL& origin_url); | 60 void DeleteIndexedDBForOrigin(const GURL& origin_url); |
| 61 | 61 |
| 62 // Does a particular origin get unlimited storage? | |
| 63 bool IsUnlimitedStorageGranted(const GURL& origin_url) const; | |
| 64 | |
| 65 // Methods used in response to QuotaManager requests. | 62 // Methods used in response to QuotaManager requests. |
| 66 void GetAllOrigins(std::vector<GURL>* origins); | 63 void GetAllOrigins(std::vector<GURL>* origins); |
| 67 int64 GetOriginDiskUsage(const GURL& origin_url); | 64 int64 GetOriginDiskUsage(const GURL& origin_url); |
| 68 base::Time GetOriginLastModified(const GURL& origin_url); | 65 base::Time GetOriginLastModified(const GURL& origin_url); |
| 69 | 66 |
| 70 // Methods called by IndexedDBDispatcherHost for quota support. | 67 // Methods called by IndexedDBDispatcherHost for quota support. |
| 71 void ConnectionOpened(const GURL& origin_url); | 68 void ConnectionOpened(const GURL& origin_url); |
| 72 void ConnectionClosed(const GURL& origin_url); | 69 void ConnectionClosed(const GURL& origin_url); |
| 73 void TransactionComplete(const GURL& origin_url); | 70 void TransactionComplete(const GURL& origin_url); |
| 74 bool WouldBeOverQuota(const GURL& origin_url, int64 additional_bytes); | 71 bool WouldBeOverQuota(const GURL& origin_url, int64 additional_bytes); |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_; | 115 scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_; |
| 119 scoped_ptr<std::set<GURL> > origin_set_; | 116 scoped_ptr<std::set<GURL> > origin_set_; |
| 120 OriginToSizeMap origin_size_map_; | 117 OriginToSizeMap origin_size_map_; |
| 121 OriginToSizeMap space_available_map_; | 118 OriginToSizeMap space_available_map_; |
| 122 std::map<GURL, unsigned int> connection_count_; | 119 std::map<GURL, unsigned int> connection_count_; |
| 123 | 120 |
| 124 DISALLOW_COPY_AND_ASSIGN(IndexedDBContext); | 121 DISALLOW_COPY_AND_ASSIGN(IndexedDBContext); |
| 125 }; | 122 }; |
| 126 | 123 |
| 127 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_CONTEXT_H_ | 124 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_CONTEXT_H_ |
| OLD | NEW |