Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(166)

Side by Side Diff: Source/modules/quota/NavigatorStorageQuota.h

Issue 158133003: Move quota module to oilpan (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 14 matching lines...) Expand all
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef NavigatorStorageQuota_h 31 #ifndef NavigatorStorageQuota_h
32 #define NavigatorStorageQuota_h 32 #define NavigatorStorageQuota_h
33 33
34 #include "core/frame/DOMWindowProperty.h" 34 #include "core/frame/DOMWindowProperty.h"
35 #include "heap/Handle.h"
36 #include "modules/quota/DeprecatedStorageQuota.h"
35 #include "platform/Supplementable.h" 37 #include "platform/Supplementable.h"
36 38
37 namespace WebCore { 39 namespace WebCore {
38 40
39 class DeprecatedStorageQuota;
40 class Frame; 41 class Frame;
41 class Navigator; 42 class Navigator;
42 class StorageQuota; 43 class StorageQuota;
43 44
45 #ifdef Navigator_IS_GARBAGE_COLLECTED
46 #define RefPtrWillBePersistentThenMember RefPtrWillBeMember
47 #else
48 #define RefPtrWillBePersistentThenMember RefPtrWillBePersistent
49 #endif
50
44 class NavigatorStorageQuota FINAL : public Supplement<Navigator>, public DOMWind owProperty { 51 class NavigatorStorageQuota FINAL : public Supplement<Navigator>, public DOMWind owProperty {
52 #ifdef Navigator_IS_GARBAGE_COLLECTED
53 DECLARE_GC_INFO;
54 #endif
45 public: 55 public:
46 virtual ~NavigatorStorageQuota(); 56 virtual ~NavigatorStorageQuota() { }
47 static NavigatorStorageQuota* from(Navigator*); 57 static NavigatorStorageQuota* from(Navigator*);
48 58
49 static StorageQuota* storageQuota(Navigator*); 59 static StorageQuota* storageQuota(Navigator*);
50 static DeprecatedStorageQuota* webkitTemporaryStorage(Navigator*); 60 static DeprecatedStorageQuota* webkitTemporaryStorage(Navigator*);
51 static DeprecatedStorageQuota* webkitPersistentStorage(Navigator*); 61 static DeprecatedStorageQuota* webkitPersistentStorage(Navigator*);
52 62
53 StorageQuota* storageQuota() const; 63 StorageQuota* storageQuota() const;
54 DeprecatedStorageQuota* webkitTemporaryStorage() const; 64 DeprecatedStorageQuota* webkitTemporaryStorage() const;
55 DeprecatedStorageQuota* webkitPersistentStorage() const; 65 DeprecatedStorageQuota* webkitPersistentStorage() const;
56 66
67 #ifdef Navigator_IS_GARBAGE_COLLECTED
68 void trace(Visitor*);
69 #endif
70
57 private: 71 private:
58 explicit NavigatorStorageQuota(Frame*); 72 explicit NavigatorStorageQuota(Frame*);
59 static const char* supplementName(); 73 static const char* supplementName();
60 74
61 mutable RefPtr<StorageQuota> m_storageQuota; 75 mutable RefPtrWillBePersistentThenMember<StorageQuota> m_storageQuota;
62 mutable RefPtr<DeprecatedStorageQuota> m_temporaryStorage; 76 mutable RefPtrWillBePersistentThenMember<DeprecatedStorageQuota> m_temporary Storage;
63 mutable RefPtr<DeprecatedStorageQuota> m_persistentStorage; 77 mutable RefPtrWillBePersistentThenMember<DeprecatedStorageQuota> m_persisten tStorage;
64 }; 78 };
65 79
66 } // namespace WebCore 80 } // namespace WebCore
67 81
82 #undef RefPtrWillBePersistentThenMember
83
68 #endif // NavigatorStorageQuota_h 84 #endif // NavigatorStorageQuota_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698