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