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

Side by Side Diff: chrome/common/db_message_filter.cc

Issue 340067: database_dispatcher_host changes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Addressed Michael's latest comments. Created 11 years, 1 month 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
« no previous file with comments | « chrome/common/db_message_filter.h ('k') | chrome/test/testing_profile.h » ('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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/common/db_message_filter.h" 5 #include "chrome/common/db_message_filter.h"
6 6
7 #include "chrome/common/child_process.h" 7 #include "chrome/common/child_process.h"
8 #include "chrome/common/render_messages.h" 8 #include "chrome/common/render_messages.h"
9 #include "webkit/api/public/WebDatabase.h"
9 10
10 DBMessageFilter* DBMessageFilter::instance_ = NULL; 11 DBMessageFilter* DBMessageFilter::instance_ = NULL;
11 12
12 DBMessageFilter::DBMessageFilter() 13 DBMessageFilter::DBMessageFilter()
13 : io_thread_message_loop_(ChildProcess::current()->io_message_loop()), 14 : io_thread_message_loop_(ChildProcess::current()->io_message_loop()),
14 channel_(NULL), 15 channel_(NULL),
15 channel_lock_(new Lock()), 16 channel_lock_(new Lock()),
16 shutdown_event_(ChildProcess::current()->GetShutDownEvent()), 17 shutdown_event_(ChildProcess::current()->GetShutDownEvent()),
17 messages_awaiting_replies_(new IDMap<DBMessageState>()), 18 messages_awaiting_replies_(new IDMap<DBMessageState>()),
18 unique_id_generator_(new base::AtomicSequenceNumber()) { 19 unique_id_generator_(new base::AtomicSequenceNumber()) {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 58
58 bool DBMessageFilter::OnMessageReceived(const IPC::Message& message) { 59 bool DBMessageFilter::OnMessageReceived(const IPC::Message& message) {
59 bool handled = true; 60 bool handled = true;
60 IPC_BEGIN_MESSAGE_MAP(DBMessageFilter, message) 61 IPC_BEGIN_MESSAGE_MAP(DBMessageFilter, message)
61 IPC_MESSAGE_HANDLER(ViewMsg_DatabaseOpenFileResponse, 62 IPC_MESSAGE_HANDLER(ViewMsg_DatabaseOpenFileResponse,
62 OnResponse<ViewMsg_DatabaseOpenFileResponse_Params>) 63 OnResponse<ViewMsg_DatabaseOpenFileResponse_Params>)
63 IPC_MESSAGE_HANDLER(ViewMsg_DatabaseDeleteFileResponse, OnResponse<int>) 64 IPC_MESSAGE_HANDLER(ViewMsg_DatabaseDeleteFileResponse, OnResponse<int>)
64 IPC_MESSAGE_HANDLER(ViewMsg_DatabaseGetFileAttributesResponse, 65 IPC_MESSAGE_HANDLER(ViewMsg_DatabaseGetFileAttributesResponse,
65 OnResponse<uint32>) 66 OnResponse<uint32>)
66 IPC_MESSAGE_HANDLER(ViewMsg_DatabaseGetFileSizeResponse, OnResponse<int64>) 67 IPC_MESSAGE_HANDLER(ViewMsg_DatabaseGetFileSizeResponse, OnResponse<int64>)
68 IPC_MESSAGE_HANDLER(ViewMsg_DatabaseUpdateSize, OnDatabaseUpdateSize)
67 IPC_MESSAGE_UNHANDLED(handled = false) 69 IPC_MESSAGE_UNHANDLED(handled = false)
68 IPC_END_MESSAGE_MAP() 70 IPC_END_MESSAGE_MAP()
69 return handled; 71 return handled;
70 } 72 }
73
74 void DBMessageFilter::OnDatabaseUpdateSize(const string16& origin_identifier,
75 const string16& database_name,
76 int64 database_size,
77 int64 space_available) {
78 WebKit::WebDatabase::updateDatabaseSize(
79 origin_identifier, database_name, database_size, space_available);
80 }
OLDNEW
« no previous file with comments | « chrome/common/db_message_filter.h ('k') | chrome/test/testing_profile.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698