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

Side by Side Diff: public/platform/WebStorageQuotaCallbacks.h

Issue 676183002: Oilpan: simplify quota storage callbacks objects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « Source/web/StorageQuotaClientImpl.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 17 matching lines...) Expand all
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 WebStorageQuotaCallbacks_h 31 #ifndef WebStorageQuotaCallbacks_h
32 #define WebStorageQuotaCallbacks_h 32 #define WebStorageQuotaCallbacks_h
33 33
34 #include "WebCommon.h" 34 #include "WebCommon.h"
35 #include "WebPrivatePtr.h" 35 #include "WebPrivatePtr.h"
36 #include "WebStorageQuotaError.h" 36 #include "WebStorageQuotaError.h"
37 37
38 namespace WTF { template <typename T> class PassOwnPtr; }
39
40 namespace blink { 38 namespace blink {
41 39
42 class StorageQuotaCallbacks; 40 class StorageQuotaCallbacks;
43 class WebStorageQuotaCallbacksPrivate;
44 41
45 class WebStorageQuotaCallbacks { 42 class WebStorageQuotaCallbacks {
46 public: 43 public:
47 ~WebStorageQuotaCallbacks() { reset(); } 44 ~WebStorageQuotaCallbacks() { reset(); }
48 WebStorageQuotaCallbacks() { } 45 WebStorageQuotaCallbacks() { }
49 WebStorageQuotaCallbacks(const WebStorageQuotaCallbacks& c) { assign(c); } 46 WebStorageQuotaCallbacks(const WebStorageQuotaCallbacks& c) { assign(c); }
50 WebStorageQuotaCallbacks& operator=(const WebStorageQuotaCallbacks& c) 47 WebStorageQuotaCallbacks& operator=(const WebStorageQuotaCallbacks& c)
51 { 48 {
52 assign(c); 49 assign(c);
53 return *this; 50 return *this;
54 } 51 }
55 52
56 BLINK_PLATFORM_EXPORT void reset(); 53 BLINK_PLATFORM_EXPORT void reset();
57 BLINK_PLATFORM_EXPORT void assign(const WebStorageQuotaCallbacks&); 54 BLINK_PLATFORM_EXPORT void assign(const WebStorageQuotaCallbacks&);
58 55
59 #if INSIDE_BLINK 56 #if INSIDE_BLINK
60 BLINK_PLATFORM_EXPORT WebStorageQuotaCallbacks(const PassOwnPtrWillBeRawPtr< StorageQuotaCallbacks>&); 57 BLINK_PLATFORM_EXPORT WebStorageQuotaCallbacks(StorageQuotaCallbacks*);
61 #endif 58 #endif
62 59
63 // Callback for WebFrameClient::queryStorageUsageAndQuota. 60 // Callback for WebFrameClient::queryStorageUsageAndQuota.
64 BLINK_PLATFORM_EXPORT void didQueryStorageUsageAndQuota(unsigned long long u sageInBytes, unsigned long long quotaInBytes); 61 BLINK_PLATFORM_EXPORT void didQueryStorageUsageAndQuota(unsigned long long u sageInBytes, unsigned long long quotaInBytes);
65 62
66 // Callback for WebFrameClient::requestStorageQuota. 63 // Callback for WebFrameClient::requestStorageQuota.
67 // This may return a smaller amount of quota than the requested. 64 // This may return a smaller amount of quota than the requested.
68 BLINK_PLATFORM_EXPORT void didGrantStorageQuota(unsigned long long usageInBy tes, unsigned long long grantedQuotaInBytes); 65 BLINK_PLATFORM_EXPORT void didGrantStorageQuota(unsigned long long usageInBy tes, unsigned long long grantedQuotaInBytes);
69 66
70 BLINK_PLATFORM_EXPORT void didFail(WebStorageQuotaError); 67 BLINK_PLATFORM_EXPORT void didFail(WebStorageQuotaError);
71 68
72 private: 69 private:
73 WebPrivatePtr<WebStorageQuotaCallbacksPrivate> m_private; 70 WebPrivatePtr<StorageQuotaCallbacks> m_private;
74 }; 71 };
75 72
76 } // namespace blink 73 } // namespace blink
77 74
78 #endif // WebStorageQuotaCallbacks_h 75 #endif // WebStorageQuotaCallbacks_h
OLDNEW
« no previous file with comments | « Source/web/StorageQuotaClientImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698