OLD | NEW |
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/database_util.h" | 5 #include "content/common/database_util.h" |
6 | 6 |
7 #include "content/common/child_thread.h" | 7 #include "content/common/child_thread.h" |
8 #include "content/common/database_messages.h" | 8 #include "content/common/database_messages.h" |
9 #include "ipc/ipc_sync_message_filter.h" | 9 #include "ipc/ipc_sync_message_filter.h" |
10 #include "third_party/sqlite/sqlite3.h" | 10 #include "third_party/sqlite/sqlite3.h" |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 return rv; | 44 return rv; |
45 } | 45 } |
46 | 46 |
47 long long DatabaseUtil::databaseGetFileSize(const WebString& vfs_file_name) { | 47 long long DatabaseUtil::databaseGetFileSize(const WebString& vfs_file_name) { |
48 int64 rv = 0LL; | 48 int64 rv = 0LL; |
49 scoped_refptr<IPC::SyncMessageFilter> filter( | 49 scoped_refptr<IPC::SyncMessageFilter> filter( |
50 ChildThread::current()->sync_message_filter()); | 50 ChildThread::current()->sync_message_filter()); |
51 filter->Send(new DatabaseHostMsg_GetFileSize(vfs_file_name, &rv)); | 51 filter->Send(new DatabaseHostMsg_GetFileSize(vfs_file_name, &rv)); |
52 return rv; | 52 return rv; |
53 } | 53 } |
| 54 |
| 55 long long DatabaseUtil::databaseGetSpaceAvailable( |
| 56 const WebString& origin_identifier) { |
| 57 int64 rv = 0LL; |
| 58 scoped_refptr<IPC::SyncMessageFilter> filter( |
| 59 ChildThread::current()->sync_message_filter()); |
| 60 filter->Send(new DatabaseHostMsg_GetSpaceAvailable(origin_identifier, &rv)); |
| 61 return rv; |
| 62 } |
OLD | NEW |