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

Side by Side Diff: third_party/WebKit/Source/modules/indexeddb/IDBValue.h

Issue 2031113002: IndexedDB Observers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Expected result changed Created 4 years, 6 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 IDBValue_h 5 #ifndef IDBValue_h
6 #define IDBValue_h 6 #define IDBValue_h
7 7
8 #include "modules/ModulesExport.h" 8 #include "modules/ModulesExport.h"
9 #include "modules/indexeddb/IDBKey.h" 9 #include "modules/indexeddb/IDBKey.h"
10 #include "modules/indexeddb/IDBKeyPath.h" 10 #include "modules/indexeddb/IDBKeyPath.h"
11 #include "platform/SharedBuffer.h" 11 #include "platform/SharedBuffer.h"
12 #include "public/platform/WebVector.h" 12 #include "public/platform/WebVector.h"
13 #include "wtf/OwnPtr.h" 13 #include "wtf/OwnPtr.h"
14 #include "wtf/RefPtr.h" 14 #include "wtf/RefPtr.h"
15 15
16 namespace blink { 16 namespace blink {
17 17
18 class BlobDataHandle; 18 class BlobDataHandle;
19 class WebBlobInfo; 19 class WebBlobInfo;
20 struct WebIDBValue; 20 struct WebIDBValue;
21 21
22 class MODULES_EXPORT IDBValue final : public RefCounted<IDBValue> { 22 class MODULES_EXPORT IDBValue final : public RefCounted<IDBValue> {
23 public: 23 public:
24 static PassRefPtr<IDBValue> create(); 24 static PassRefPtr<IDBValue> create();
25 static PassRefPtr<IDBValue> create(const WebIDBValue&); 25 static PassRefPtr<IDBValue> create(const WebIDBValue&);
26 static PassRefPtr<IDBValue> create(const IDBValue*, IDBKey*, const IDBKeyPat h&); 26 static PassRefPtr<IDBValue> create(const IDBValue*, IDBKey*, const IDBKeyPat h&);
27 virtual ~IDBValue();
Marijn Kruisselbrink 2016/06/15 13:02:45 Why this change?
dmurph 2016/06/15 13:10:48 It was causing problems where BlobDataHandle and I
Marijn Kruisselbrink 2016/06/15 13:22:37 Sorry, I can't quite parse that sentence... What w
palakj1 2016/06/15 19:16:31 Our destructor calls the IDBValue destructor. Sinc
Marijn Kruisselbrink 2016/06/16 07:09:30 That explains why you need an explicit destructor,
27 28
28 bool isNull() const; 29 bool isNull() const;
29 Vector<String> getUUIDs() const; 30 Vector<String> getUUIDs() const;
30 const SharedBuffer* data() const; 31 const SharedBuffer* data() const;
31 Vector<WebBlobInfo>* blobInfo() const { return m_blobInfo.get(); } 32 Vector<WebBlobInfo>* blobInfo() const { return m_blobInfo.get(); }
32 const IDBKey* primaryKey() const { return m_primaryKey; } 33 const IDBKey* primaryKey() const { return m_primaryKey; }
33 const IDBKeyPath& keyPath() const { return m_keyPath; } 34 const IDBKeyPath& keyPath() const { return m_keyPath; }
34 35
35 private: 36 private:
36 IDBValue(); 37 IDBValue();
37 IDBValue(const WebIDBValue&); 38 IDBValue(const WebIDBValue&);
38 IDBValue(PassRefPtr<SharedBuffer>, const WebVector<WebBlobInfo>&, IDBKey*, c onst IDBKeyPath&); 39 IDBValue(PassRefPtr<SharedBuffer>, const WebVector<WebBlobInfo>&, IDBKey*, c onst IDBKeyPath&);
39 IDBValue(const IDBValue*, IDBKey*, const IDBKeyPath&); 40 IDBValue(const IDBValue*, IDBKey*, const IDBKeyPath&);
40 41
41 const RefPtr<SharedBuffer> m_data; 42 const RefPtr<SharedBuffer> m_data;
42 const OwnPtr<Vector<RefPtr<BlobDataHandle>>> m_blobData; 43 const OwnPtr<Vector<RefPtr<BlobDataHandle>>> m_blobData;
43 const OwnPtr<Vector<WebBlobInfo>> m_blobInfo; 44 const OwnPtr<Vector<WebBlobInfo>> m_blobInfo;
44 const Persistent<IDBKey> m_primaryKey; 45 const Persistent<IDBKey> m_primaryKey;
45 const IDBKeyPath m_keyPath; 46 const IDBKeyPath m_keyPath;
46 }; 47 };
47 48
48 } // namespace blink 49 } // namespace blink
49 50
50 #endif 51 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698