OLD | NEW |
1 // Copyright (c) 2011 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_COMMON_DB_MESSAGE_FILTER_H_ | 5 #ifndef CONTENT_COMMON_DB_MESSAGE_FILTER_H_ |
6 #define CONTENT_COMMON_DB_MESSAGE_FILTER_H_ | 6 #define CONTENT_COMMON_DB_MESSAGE_FILTER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ipc/ipc_channel_proxy.h" | 9 #include "ipc/ipc_channel_proxy.h" |
10 | 10 |
11 // Receives database messages from the browser process and processes them on the | 11 // Receives database messages from the browser process and processes them on the |
12 // IO thread. | 12 // IO thread. |
13 class DBMessageFilter : public IPC::ChannelProxy::MessageFilter { | 13 class DBMessageFilter : public IPC::ChannelProxy::MessageFilter { |
14 public: | 14 public: |
15 DBMessageFilter(); | 15 DBMessageFilter(); |
16 | 16 |
17 private: | 17 // IPC::ChannelProxy::MessageFilter |
18 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 18 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
19 | 19 |
| 20 protected: |
| 21 virtual ~DBMessageFilter() {} |
| 22 |
| 23 private: |
20 void OnDatabaseUpdateSize(const string16& origin_identifier, | 24 void OnDatabaseUpdateSize(const string16& origin_identifier, |
21 const string16& database_name, | 25 const string16& database_name, |
22 int64 database_size); | 26 int64 database_size); |
23 void OnDatabaseUpdateSpaceAvailable(const string16& origin_identifier, | 27 void OnDatabaseUpdateSpaceAvailable(const string16& origin_identifier, |
24 int64 space_available); | 28 int64 space_available); |
25 void OnDatabaseResetSpaceAvailable(const string16& origin_identifier); | 29 void OnDatabaseResetSpaceAvailable(const string16& origin_identifier); |
26 void OnDatabaseCloseImmediately(const string16& origin_identifier, | 30 void OnDatabaseCloseImmediately(const string16& origin_identifier, |
27 const string16& database_name); | 31 const string16& database_name); |
28 }; | 32 }; |
29 | 33 |
30 #endif // CONTENT_COMMON_DB_MESSAGE_FILTER_H_ | 34 #endif // CONTENT_COMMON_DB_MESSAGE_FILTER_H_ |
OLD | NEW |