OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CHILD_DB_MESSAGE_FILTER_H_ | 5 #ifndef CONTENT_CHILD_DB_MESSAGE_FILTER_H_ |
6 #define CONTENT_CHILD_DB_MESSAGE_FILTER_H_ | 6 #define CONTENT_CHILD_DB_MESSAGE_FILTER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
11 #include "ipc/message_filter.h" | 11 #include "ipc/message_filter.h" |
12 | 12 |
| 13 namespace url { |
| 14 class Origin; |
| 15 } // namespace url |
| 16 |
13 namespace content { | 17 namespace content { |
14 | 18 |
15 // Receives database messages from the browser process and processes them on the | 19 // Receives database messages from the browser process and processes them on the |
16 // IO thread. | 20 // IO thread. |
17 class DBMessageFilter : public IPC::MessageFilter { | 21 class DBMessageFilter : public IPC::MessageFilter { |
18 public: | 22 public: |
19 DBMessageFilter(); | 23 DBMessageFilter(); |
20 | 24 |
21 // IPC::MessageFilter | 25 // IPC::MessageFilter |
22 bool OnMessageReceived(const IPC::Message& message) override; | 26 bool OnMessageReceived(const IPC::Message& message) override; |
23 | 27 |
24 protected: | 28 protected: |
25 ~DBMessageFilter() override {} | 29 ~DBMessageFilter() override {} |
26 | 30 |
27 private: | 31 private: |
28 void OnDatabaseUpdateSize(const std::string& origin_identifier, | 32 void OnDatabaseUpdateSize(const url::Origin& origin, |
29 const base::string16& database_name, | 33 const base::string16& database_name, |
30 int64_t database_size); | 34 int64_t database_size); |
31 void OnDatabaseUpdateSpaceAvailable(const std::string& origin_identifier, | 35 void OnDatabaseUpdateSpaceAvailable(const url::Origin& origin, |
32 int64_t space_available); | 36 int64_t space_available); |
33 void OnDatabaseResetSpaceAvailable(const std::string& origin_identifier); | 37 void OnDatabaseResetSpaceAvailable(const url::Origin& origin); |
34 void OnDatabaseCloseImmediately(const std::string& origin_identifier, | 38 void OnDatabaseCloseImmediately(const url::Origin& origin, |
35 const base::string16& database_name); | 39 const base::string16& database_name); |
36 }; | 40 }; |
37 | 41 |
38 } // namespace content | 42 } // namespace content |
39 | 43 |
40 #endif // CONTENT_CHILD_DB_MESSAGE_FILTER_H_ | 44 #endif // CONTENT_CHILD_DB_MESSAGE_FILTER_H_ |
OLD | NEW |