OLD | NEW |
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 bool IsRecordingType(blink::WebIDBOperationType type) const { | 47 bool IsRecordingType(blink::WebIDBOperationType type) const { |
48 DCHECK_NE(type, blink::WebIDBOperationTypeCount); | 48 DCHECK_NE(type, blink::WebIDBOperationTypeCount); |
49 return options_.operation_types[type]; | 49 return options_.operation_types[type]; |
50 } | 50 } |
51 bool IsRecordingObjectStore(int64_t object_store_id) const { | 51 bool IsRecordingObjectStore(int64_t object_store_id) const { |
52 return ContainsValue(object_store_ids_, object_store_id); | 52 return base::ContainsValue(object_store_ids_, object_store_id); |
53 } | 53 } |
54 bool include_transaction() const { return options_.include_transaction; } | 54 bool include_transaction() const { return options_.include_transaction; } |
55 bool no_records() const { return options_.no_records; } | 55 bool no_records() const { return options_.no_records; } |
56 bool values() const { return options_.values; } | 56 bool values() const { return options_.values; } |
57 | 57 |
58 private: | 58 private: |
59 int32_t id_; | 59 int32_t id_; |
60 std::set<int64_t> object_store_ids_; | 60 std::set<int64_t> object_store_ids_; |
61 Options options_; | 61 Options options_; |
62 | 62 |
63 DISALLOW_COPY_AND_ASSIGN(IndexedDBObserver); | 63 DISALLOW_COPY_AND_ASSIGN(IndexedDBObserver); |
64 }; | 64 }; |
65 | 65 |
66 } // namespace content | 66 } // namespace content |
67 | 67 |
68 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_OBSERVER_H_ | 68 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_OBSERVER_H_ |
OLD | NEW |