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

Side by Side Diff: content/browser/in_process_webkit/indexed_db_database_callbacks.cc

Issue 10695158: IndexedDB: Close open databases when user requests browsing data deletion (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove const from iterator (not sure how this slipped through) Created 8 years, 3 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 | Annotate | Revision Log
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 #include "content/browser/in_process_webkit/indexed_db_database_callbacks.h" 5 #include "content/browser/in_process_webkit/indexed_db_database_callbacks.h"
6 6
7 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h" 7 #include "content/browser/in_process_webkit/indexed_db_dispatcher_host.h"
8 #include "content/common/indexed_db/indexed_db_messages.h" 8 #include "content/common/indexed_db/indexed_db_messages.h"
9 9
10 IndexedDBDatabaseCallbacks::IndexedDBDatabaseCallbacks( 10 IndexedDBDatabaseCallbacks::IndexedDBDatabaseCallbacks(
11 IndexedDBDispatcherHost* dispatcher_host, 11 IndexedDBDispatcherHost* dispatcher_host,
12 int thread_id, 12 int thread_id,
13 int database_id) 13 int database_id)
14 : dispatcher_host_(dispatcher_host), 14 : dispatcher_host_(dispatcher_host),
15 thread_id_(thread_id), 15 thread_id_(thread_id),
16 database_id_(database_id) { 16 database_id_(database_id) {
17 } 17 }
18 18
19 IndexedDBDatabaseCallbacks::~IndexedDBDatabaseCallbacks() { 19 IndexedDBDatabaseCallbacks::~IndexedDBDatabaseCallbacks() {
20 } 20 }
21 21
22 void IndexedDBDatabaseCallbacks::onForcedClose() {
23 dispatcher_host_->Send(
24 new IndexedDBMsg_DatabaseCallbacksForcedClose(thread_id_, database_id_));
25 }
26
22 void IndexedDBDatabaseCallbacks::onVersionChange(long long old_version, 27 void IndexedDBDatabaseCallbacks::onVersionChange(long long old_version,
23 long long new_version) { 28 long long new_version) {
24 dispatcher_host_->Send( 29 dispatcher_host_->Send(
25 new IndexedDBMsg_DatabaseCallbacksIntVersionChange(thread_id_, 30 new IndexedDBMsg_DatabaseCallbacksIntVersionChange(thread_id_,
26 database_id_, 31 database_id_,
27 old_version, 32 old_version,
28 new_version)); 33 new_version));
29 } 34 }
30 35
31 void IndexedDBDatabaseCallbacks::onVersionChange( 36 void IndexedDBDatabaseCallbacks::onVersionChange(
32 const WebKit::WebString& requested_version) { 37 const WebKit::WebString& requested_version) {
33 dispatcher_host_->Send( 38 dispatcher_host_->Send(
34 new IndexedDBMsg_DatabaseCallbacksVersionChange(thread_id_, database_id_, 39 new IndexedDBMsg_DatabaseCallbacksVersionChange(thread_id_, database_id_,
35 requested_version)); 40 requested_version));
36 } 41 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698