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

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

Issue 2160163002: [IndexedDB] Propogating Changes to Observer : Browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Expected tests updated Created 4 years, 5 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_OBSERVATION_H_
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_OBSERVATION_H_
7
8 #include "base/macros.h"
9 #include "content/browser/indexed_db/indexed_db_value.h"
10 #include "content/common/content_export.h"
11 #include "content/common/indexed_db/indexed_db_key_range.h"
12 #include "third_party/WebKit/public/platform/modules/indexeddb/WebIDBTypes.h"
13
14 namespace content {
15
16 // Represents a single observed operation (put/add/delete/clear) of a
17 // transaction.
18 class IndexedDBObservation {
19 public:
20 using OperationType = blink::WebIDBOperationType;
21
22 IndexedDBObservation(int32_t object_store_id, OperationType type);
23 IndexedDBObservation(int32_t object_store_id,
24 OperationType type,
25 IndexedDBKeyRange key_range);
26 IndexedDBObservation(int32_t object_store_id,
27 OperationType type,
28 IndexedDBKeyRange key_range,
29 IndexedDBValue value);
30
31 ~IndexedDBObservation();
32
33 int64_t object_store_id() const { return object_store_id_; }
34 OperationType type() const { return type_; }
35 const IndexedDBKeyRange key_range() const { return key_range_; }
36 const IndexedDBValue value() const { return value_; }
37
38 private:
39 int64_t object_store_id_;
40 OperationType type_;
41 // Populated for ADD, PUT, and DELETE operations.
42 IndexedDBKeyRange key_range_;
43 // Populated for ADD and PUT operations if values are requested.
44 IndexedDBValue value_;
45
46 DISALLOW_COPY_AND_ASSIGN(IndexedDBObservation);
47 };
48
49 } // namespace content
50
51 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_OBSERVATION_H_
OLDNEW
« no previous file with comments | « content/browser/indexed_db/indexed_db_dispatcher_host.cc ('k') | content/browser/indexed_db/indexed_db_observation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698