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

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

Issue 7037018: DB quota (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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
« no previous file with comments | « content/common/db_message_filter.h ('k') | content/renderer/renderer_webkitclient_impl.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/common/db_message_filter.h" 5 #include "content/common/db_message_filter.h"
6 6
7 #include "content/common/database_messages.h" 7 #include "content/common/database_messages.h"
8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h"
9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" 9 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
10 10
11 DBMessageFilter::DBMessageFilter() { 11 DBMessageFilter::DBMessageFilter() {
12 } 12 }
13 13
14 bool DBMessageFilter::OnMessageReceived(const IPC::Message& message) { 14 bool DBMessageFilter::OnMessageReceived(const IPC::Message& message) {
15 bool handled = true; 15 bool handled = true;
16 IPC_BEGIN_MESSAGE_MAP(DBMessageFilter, message) 16 IPC_BEGIN_MESSAGE_MAP(DBMessageFilter, message)
17 IPC_MESSAGE_HANDLER(DatabaseMsg_UpdateSize, OnDatabaseUpdateSize) 17 IPC_MESSAGE_HANDLER(DatabaseMsg_UpdateSize, OnDatabaseUpdateSize)
18 IPC_MESSAGE_HANDLER(DatabaseMsg_UpdateSpaceAvailable,
19 OnDatabaseUpdateSpaceAvailable)
20 IPC_MESSAGE_HANDLER(DatabaseMsg_ResetSpaceAvailable,
21 OnDatabaseResetSpaceAvailable)
18 IPC_MESSAGE_HANDLER(DatabaseMsg_CloseImmediately, 22 IPC_MESSAGE_HANDLER(DatabaseMsg_CloseImmediately,
19 OnDatabaseCloseImmediately) 23 OnDatabaseCloseImmediately)
20 IPC_MESSAGE_UNHANDLED(handled = false) 24 IPC_MESSAGE_UNHANDLED(handled = false)
21 IPC_END_MESSAGE_MAP() 25 IPC_END_MESSAGE_MAP()
22 return handled; 26 return handled;
23 } 27 }
24 28
25 void DBMessageFilter::OnDatabaseUpdateSize(const string16& origin_identifier, 29 void DBMessageFilter::OnDatabaseUpdateSize(const string16& origin_identifier,
26 const string16& database_name, 30 const string16& database_name,
27 int64 database_size, 31 int64 database_size) {
28 int64 space_available) {
29 WebKit::WebDatabase::updateDatabaseSize( 32 WebKit::WebDatabase::updateDatabaseSize(
30 origin_identifier, database_name, database_size, space_available); 33 origin_identifier, database_name, database_size);
34 }
35
36 void DBMessageFilter::OnDatabaseUpdateSpaceAvailable(
37 const string16& origin_identifier,
38 int64 space_available) {
39 WebKit::WebDatabase::updateSpaceAvailable(
40 origin_identifier, space_available);
41 }
42
43 void DBMessageFilter::OnDatabaseResetSpaceAvailable(
44 const string16& origin_identifier) {
45 WebKit::WebDatabase::resetSpaceAvailable(origin_identifier);
31 } 46 }
32 47
33 void DBMessageFilter::OnDatabaseCloseImmediately( 48 void DBMessageFilter::OnDatabaseCloseImmediately(
34 const string16& origin_identifier, 49 const string16& origin_identifier,
35 const string16& database_name) { 50 const string16& database_name) {
36 WebKit::WebDatabase::closeDatabaseImmediately( 51 WebKit::WebDatabase::closeDatabaseImmediately(
37 origin_identifier, database_name); 52 origin_identifier, database_name);
38 } 53 }
OLDNEW
« no previous file with comments | « content/common/db_message_filter.h ('k') | content/renderer/renderer_webkitclient_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698