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

Side by Side Diff: content/browser/indexed_db/indexed_db_observer.h

Issue 2601983002: [IndexedDB] Adding transaction and value support to observers (Closed)
Patch Set: fixed bit check Created 3 years, 11 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_INDEXED_DB_INDEXED_DB_OBSERVER_H_ 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_OBSERVER_H_
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_OBSERVER_H_ 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_OBSERVER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 26 matching lines...) Expand all
37 IndexedDBObserver(int32_t observer_id, 37 IndexedDBObserver(int32_t observer_id,
38 std::set<int64_t> object_store_ids, 38 std::set<int64_t> object_store_ids,
39 const Options& options); 39 const Options& options);
40 ~IndexedDBObserver(); 40 ~IndexedDBObserver();
41 41
42 int32_t id() const { return id_; } 42 int32_t id() const { return id_; }
43 const std::set<int64_t>& object_store_ids() const { 43 const std::set<int64_t>& object_store_ids() const {
44 return object_store_ids_; 44 return object_store_ids_;
45 } 45 }
46 46
47 void set_object_store_ids(std::set<int64_t> ids) {
48 object_store_ids_ = std::move(ids);
49 }
50
47 bool IsRecordingType(blink::WebIDBOperationType type) const { 51 bool IsRecordingType(blink::WebIDBOperationType type) const {
48 DCHECK_NE(type, blink::WebIDBOperationTypeCount); 52 DCHECK_NE(type, blink::WebIDBOperationTypeCount);
49 return options_.operation_types[type]; 53 return options_.operation_types[type];
50 } 54 }
51 bool IsRecordingObjectStore(int64_t object_store_id) const { 55 bool IsRecordingObjectStore(int64_t object_store_id) const {
52 return base::ContainsValue(object_store_ids_, object_store_id); 56 return base::ContainsValue(object_store_ids_, object_store_id);
53 } 57 }
54 bool include_transaction() const { return options_.include_transaction; } 58 bool include_transaction() const { return options_.include_transaction; }
55 bool no_records() const { return options_.no_records; } 59 bool no_records() const { return options_.no_records; }
56 bool values() const { return options_.values; } 60 bool values() const { return options_.values; }
57 61
58 private: 62 private:
59 int32_t id_; 63 int32_t id_;
60 std::set<int64_t> object_store_ids_; 64 std::set<int64_t> object_store_ids_;
61 Options options_; 65 Options options_;
62 66
63 DISALLOW_COPY_AND_ASSIGN(IndexedDBObserver); 67 DISALLOW_COPY_AND_ASSIGN(IndexedDBObserver);
64 }; 68 };
65 69
66 } // namespace content 70 } // namespace content
67 71
68 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_OBSERVER_H_ 72 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698