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

Unified Diff: content/common/database_util.cc

Issue 16328003: Move a bunch of child-only code from content/common to content/child (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/database_util.h ('k') | content/common/fileapi/file_system_dispatcher.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/database_util.cc
diff --git a/content/common/database_util.cc b/content/common/database_util.cc
deleted file mode 100644
index d8478812b81583e87fcf429b379cb289fad05034..0000000000000000000000000000000000000000
--- a/content/common/database_util.cc
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "content/common/database_util.h"
-
-#include "content/common/child_thread.h"
-#include "content/common/database_messages.h"
-#include "ipc/ipc_sync_message_filter.h"
-#include "third_party/WebKit/public/platform/WebString.h"
-#include "third_party/sqlite/sqlite3.h"
-
-using WebKit::Platform;
-using WebKit::WebString;
-
-namespace content {
-
-Platform::FileHandle DatabaseUtil::DatabaseOpenFile(
- const WebString& vfs_file_name, int desired_flags) {
- IPC::PlatformFileForTransit file_handle =
- IPC::InvalidPlatformFileForTransit();
-
- scoped_refptr<IPC::SyncMessageFilter> filter(
- ChildThread::current()->sync_message_filter());
- filter->Send(new DatabaseHostMsg_OpenFile(
- vfs_file_name, desired_flags, &file_handle));
-
- return IPC::PlatformFileForTransitToPlatformFile(file_handle);
-}
-
-int DatabaseUtil::DatabaseDeleteFile(
- const WebString& vfs_file_name, bool sync_dir) {
- int rv = SQLITE_IOERR_DELETE;
- scoped_refptr<IPC::SyncMessageFilter> filter(
- ChildThread::current()->sync_message_filter());
- filter->Send(new DatabaseHostMsg_DeleteFile(
- vfs_file_name, sync_dir, &rv));
- return rv;
-}
-
-long DatabaseUtil::DatabaseGetFileAttributes(const WebString& vfs_file_name) {
- int32 rv = -1;
- scoped_refptr<IPC::SyncMessageFilter> filter(
- ChildThread::current()->sync_message_filter());
- filter->Send(new DatabaseHostMsg_GetFileAttributes(vfs_file_name, &rv));
- return rv;
-}
-
-long long DatabaseUtil::DatabaseGetFileSize(const WebString& vfs_file_name) {
- int64 rv = 0LL;
- scoped_refptr<IPC::SyncMessageFilter> filter(
- ChildThread::current()->sync_message_filter());
- filter->Send(new DatabaseHostMsg_GetFileSize(vfs_file_name, &rv));
- return rv;
-}
-
-long long DatabaseUtil::DatabaseGetSpaceAvailable(
- const WebString& origin_identifier) {
- int64 rv = 0LL;
- scoped_refptr<IPC::SyncMessageFilter> filter(
- ChildThread::current()->sync_message_filter());
- filter->Send(new DatabaseHostMsg_GetSpaceAvailable(origin_identifier, &rv));
- return rv;
-}
-
-} // namespace content
« no previous file with comments | « content/common/database_util.h ('k') | content/common/fileapi/file_system_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698