Chromium Code Reviews| 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" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 13 | 13 |
| 14 class GURL; | 14 class GURL; |
| 15 class FilePath; | 15 class FilePath; |
| 16 class WebKitContext; | 16 class WebKitContext; |
| 17 | 17 |
| 18 namespace WebKit { | 18 namespace WebKit { |
| 19 class WebIDBFactory; | 19 class WebIDBFactory; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace base { | |
| 23 class MessageLoopProxy; | |
| 24 } | |
| 25 | |
| 22 namespace quota { | 26 namespace quota { |
| 27 class QuotaManagerProxy; | |
| 23 class SpecialStoragePolicy; | 28 class SpecialStoragePolicy; |
| 24 } | 29 } |
| 25 | 30 |
| 26 class IndexedDBContext { | 31 class IndexedDBContext : public base::RefCountedThreadSafe<IndexedDBContext> { |
|
michaeln
2011/05/26 03:48:41
: public base::RefCountedThreadSafe<IndexedDBConte
dgrogan
2011/05/26 05:41:19
Thanks for pointing this out, writing my own Trait
| |
| 27 public: | 32 public: |
| 28 IndexedDBContext(WebKitContext* webkit_context, | 33 IndexedDBContext(WebKitContext* webkit_context, |
| 29 quota::SpecialStoragePolicy* special_storage_policy); | 34 quota::SpecialStoragePolicy* special_storage_policy, |
| 35 quota::QuotaManagerProxy* quota_manager_proxy, | |
| 36 base::MessageLoopProxy* webkit_thread_loop); | |
| 37 | |
| 30 ~IndexedDBContext(); | 38 ~IndexedDBContext(); |
| 31 | 39 |
| 32 WebKit::WebIDBFactory* GetIDBFactory(); | 40 WebKit::WebIDBFactory* GetIDBFactory(); |
| 33 | 41 |
| 34 // The indexed db directory. | 42 // The indexed db directory. |
| 35 static const FilePath::CharType kIndexedDBDirectory[]; | 43 static const FilePath::CharType kIndexedDBDirectory[]; |
| 36 | 44 |
| 37 // The indexed db file extension. | 45 // The indexed db file extension. |
| 38 static const FilePath::CharType kIndexedDBExtension[]; | 46 static const FilePath::CharType kIndexedDBExtension[]; |
| 39 | 47 |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 62 scoped_ptr<WebKit::WebIDBFactory> idb_factory_; | 70 scoped_ptr<WebKit::WebIDBFactory> idb_factory_; |
| 63 | 71 |
| 64 // Path where the indexed db data is stored | 72 // Path where the indexed db data is stored |
| 65 FilePath data_path_; | 73 FilePath data_path_; |
| 66 | 74 |
| 67 // True if the destructor should delete its files. | 75 // True if the destructor should delete its files. |
| 68 bool clear_local_state_on_exit_; | 76 bool clear_local_state_on_exit_; |
| 69 | 77 |
| 70 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; | 78 scoped_refptr<quota::SpecialStoragePolicy> special_storage_policy_; |
| 71 | 79 |
| 80 scoped_refptr<quota::QuotaManagerProxy> quota_manager_proxy_; | |
| 81 | |
| 72 DISALLOW_COPY_AND_ASSIGN(IndexedDBContext); | 82 DISALLOW_COPY_AND_ASSIGN(IndexedDBContext); |
| 73 }; | 83 }; |
| 74 | 84 |
| 75 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_CONTEXT_H_ | 85 #endif // CONTENT_BROWSER_IN_PROCESS_WEBKIT_INDEXED_DB_CONTEXT_H_ |
| OLD | NEW |