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

Side by Side Diff: Source/modules/quota/WorkerNavigatorStorageQuota.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 15 matching lines...) Expand all
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 WorkerNavigatorStorageQuota_h 31 #ifndef WorkerNavigatorStorageQuota_h
32 #define WorkerNavigatorStorageQuota_h 32 #define WorkerNavigatorStorageQuota_h
33 33
34 #include "core/frame/DOMWindowProperty.h" 34 #include "core/frame/DOMWindowProperty.h"
35 #include "core/workers/WorkerNavigator.h" 35 #include "core/workers/WorkerNavigator.h"
36 #include "heap/Handle.h"
37 #include "modules/quota/DeprecatedStorageQuota.h"
36 #include "platform/Supplementable.h" 38 #include "platform/Supplementable.h"
37 39
38 namespace WebCore { 40 namespace WebCore {
39 41
40 class DeprecatedStorageQuota; 42 #ifdef WorkerNavigator_IS_GARBAGE_COLLECTED
41 class WorkerNavigator; 43 #define RefPtrWillBePersistentThenMember RefPtrWillBeMember
44 #else
45 #define RefPtrWillBePersistentThenMember RefPtrWillBePersistent
46 #endif
42 47
43 class WorkerNavigatorStorageQuota FINAL : public Supplement<WorkerNavigator> { 48 class WorkerNavigatorStorageQuota FINAL : public Supplement<WorkerNavigator> {
49 #ifdef WorkerNavigator_IS_GARBAGE_COLLECTED
50 DECLARE_GC_INFO
51 #endif
44 public: 52 public:
45 virtual ~WorkerNavigatorStorageQuota(); 53 virtual ~WorkerNavigatorStorageQuota() { }
46 static WorkerNavigatorStorageQuota* from(WorkerNavigator*); 54 static WorkerNavigatorStorageQuota* from(WorkerNavigator*);
47 55
48 static DeprecatedStorageQuota* webkitTemporaryStorage(WorkerNavigator*); 56 static DeprecatedStorageQuota* webkitTemporaryStorage(WorkerNavigator*);
49 static DeprecatedStorageQuota* webkitPersistentStorage(WorkerNavigator*); 57 static DeprecatedStorageQuota* webkitPersistentStorage(WorkerNavigator*);
50 DeprecatedStorageQuota* webkitTemporaryStorage() const; 58 DeprecatedStorageQuota* webkitTemporaryStorage() const;
51 DeprecatedStorageQuota* webkitPersistentStorage() const; 59 DeprecatedStorageQuota* webkitPersistentStorage() const;
52 60
61 #ifdef WorkerNavigator_IS_GARBAGE_COLLECTED
62 void trace(Visitor*);
63 #endif
64
53 private: 65 private:
54 explicit WorkerNavigatorStorageQuota(); 66 explicit WorkerNavigatorStorageQuota() { }
55 static const char* supplementName(); 67 static const char* supplementName();
56 68
57 mutable RefPtr<DeprecatedStorageQuota> m_temporaryStorage; 69 mutable RefPtrWillBePersistentThenMember<DeprecatedStorageQuota> m_temporary Storage;
58 mutable RefPtr<DeprecatedStorageQuota> m_persistentStorage; 70 mutable RefPtrWillBePersistentThenMember<DeprecatedStorageQuota> m_persisten tStorage;
59 }; 71 };
60 72
73 #undef RefPtrWillBePersistentThenMember
74
61 } // namespace WebCore 75 } // namespace WebCore
62 76
63 #endif // WorkerNavigatorStorageQuota_h 77 #endif // WorkerNavigatorStorageQuota_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698