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

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

Issue 2439863002: Prevent cross-thread refcounting for thread-unsafe IndexedDBCallbacks. (Closed)
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_callbacks.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_CALLBACKS_H_ 5 #ifndef CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_
6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_ 6 #define CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/logging.h" 14 #include "base/logging.h"
15 #include "base/macros.h" 15 #include "base/macros.h"
16 #include "base/memory/ref_counted.h" 16 #include "base/memory/ref_counted.h"
17 #include "base/strings/string16.h" 17 #include "base/strings/string16.h"
18 #include "base/threading/thread_checker.h"
18 #include "content/browser/indexed_db/indexed_db_database_error.h" 19 #include "content/browser/indexed_db/indexed_db_database_error.h"
19 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h" 20 #include "content/browser/indexed_db/indexed_db_dispatcher_host.h"
20 #include "content/common/indexed_db/indexed_db.mojom.h" 21 #include "content/common/indexed_db/indexed_db.mojom.h"
21 #include "content/common/indexed_db/indexed_db_key.h" 22 #include "content/common/indexed_db/indexed_db_key.h"
22 #include "content/common/indexed_db/indexed_db_key_path.h" 23 #include "content/common/indexed_db/indexed_db_key_path.h"
23 #include "url/origin.h" 24 #include "url/origin.h"
24 25
25 namespace content { 26 namespace content {
26 class IndexedDBBlobInfo; 27 class IndexedDBBlobInfo;
27 class IndexedDBConnection; 28 class IndexedDBConnection;
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 int32_t ipc_database_id_; 142 int32_t ipc_database_id_;
142 143
143 // Used to assert that OnSuccess is only called if there was no data loss. 144 // Used to assert that OnSuccess is only called if there was no data loss.
144 blink::WebIDBDataLoss data_loss_; 145 blink::WebIDBDataLoss data_loss_;
145 146
146 // The "blocked" event should be sent at most once per request. 147 // The "blocked" event should be sent at most once per request.
147 bool sent_blocked_; 148 bool sent_blocked_;
148 base::TimeTicks connection_open_start_time_; 149 base::TimeTicks connection_open_start_time_;
149 150
150 std::unique_ptr<IOThreadHelper, BrowserThread::DeleteOnIOThread> io_helper_; 151 std::unique_ptr<IOThreadHelper, BrowserThread::DeleteOnIOThread> io_helper_;
152 base::ThreadChecker thread_checker_;
151 153
152 DISALLOW_COPY_AND_ASSIGN(IndexedDBCallbacks); 154 DISALLOW_COPY_AND_ASSIGN(IndexedDBCallbacks);
153 }; 155 };
154 156
155 } // namespace content 157 } // namespace content
156 158
157 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_ 159 #endif // CONTENT_BROWSER_INDEXED_DB_INDEXED_DB_CALLBACKS_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/indexed_db/indexed_db_callbacks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698