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 "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 | 55 |
56 // Deletes a single indexed db file. | 56 // Deletes a single indexed db file. |
57 void DeleteIndexedDBFile(const FilePath& file_path); | 57 void DeleteIndexedDBFile(const FilePath& file_path); |
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 string16& origin_id); | 60 void DeleteIndexedDBForOrigin(const string16& origin_id); |
61 | 61 |
62 // Does a particular origin get unlimited storage? | 62 // Does a particular origin get unlimited storage? |
63 bool IsUnlimitedStorageGranted(const GURL& origin) const; | 63 bool IsUnlimitedStorageGranted(const GURL& origin) const; |
64 | 64 |
| 65 void GetAllOriginIdentifiers(std::vector<string16>* origin_ids); |
| 66 |
65 #ifdef UNIT_TEST | 67 #ifdef UNIT_TEST |
66 // For unit tests allow to override the |data_path_|. | 68 // For unit tests allow to override the |data_path_|. |
67 void set_data_path(const FilePath& data_path) { data_path_ = data_path; } | 69 void set_data_path(const FilePath& data_path) { data_path_ = data_path; } |
68 #endif | 70 #endif |
69 | 71 |
70 private: | 72 private: |
71 scoped_ptr<WebKit::WebIDBFactory> idb_factory_; | 73 scoped_ptr<WebKit::WebIDBFactory> idb_factory_; |
72 | 74 |
73 // Path where the indexed db data is stored | 75 // Path where the indexed db data is stored |
74 FilePath data_path_; | 76 FilePath data_path_; |
75 | 77 |
76 // True if the destructor should delete its files. | 78 // True if the destructor should delete its files. |
77 bool clear_local_state_on_exit_; | 79 bool clear_local_state_on_exit_; |
78 | 80 |
79 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; | 81 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; |
80 | 82 |
81 scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_; | 83 scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_; |
82 | 84 |
83 DISALLOW_COPY_AND_ASSIGN(IndexedDBContext); | 85 DISALLOW_COPY_AND_ASSIGN(IndexedDBContext); |
84 }; | 86 }; |
85 | 87 |
86 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_CONTEXT_H_ | 88 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_CONTEXT_H_ |
OLD | NEW |