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

Unified Diff: content/common_child/fileapi/webfilesystem_callback_adapters.cc

Issue 16325022: move content/common_child 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
Index: content/common_child/fileapi/webfilesystem_callback_adapters.cc
diff --git a/content/common_child/fileapi/webfilesystem_callback_adapters.cc b/content/common_child/fileapi/webfilesystem_callback_adapters.cc
deleted file mode 100644
index 66484171a23fd2063876ac43a2e10676ed1a2204..0000000000000000000000000000000000000000
--- a/content/common_child/fileapi/webfilesystem_callback_adapters.cc
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright (c) 2012 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_child/fileapi/webfilesystem_callback_adapters.h"
-
-#include <string>
-#include <vector>
-
-#include "base/logging.h"
-#include "base/utf_string_conversions.h"
-#include "googleurl/src/gurl.h"
-#include "third_party/WebKit/public/platform/WebFileInfo.h"
-#include "third_party/WebKit/public/platform/WebString.h"
-#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallbacks.h"
-#include "webkit/base/file_path_string_conversions.h"
-#include "webkit/common/fileapi/directory_entry.h"
-#include "webkit/common/fileapi/file_system_util.h"
-#include "webkit/glue/webkit_glue.h"
-
-using WebKit::WebFileInfo;
-using WebKit::WebFileSystemCallbacks;
-using WebKit::WebFileSystemEntry;
-using WebKit::WebString;
-using WebKit::WebVector;
-
-namespace content {
-
-void FileStatusCallbackAdapter(
- WebKit::WebFileSystemCallbacks* callbacks,
- base::PlatformFileError error) {
- if (error == base::PLATFORM_FILE_OK)
- callbacks->didSucceed();
- else
- callbacks->didFail(::fileapi::PlatformFileErrorToWebFileError(error));
-}
-
-void ReadMetadataCallbackAdapter(
- WebKit::WebFileSystemCallbacks* callbacks,
- const base::PlatformFileInfo& file_info,
- const base::FilePath& platform_path) {
- WebFileInfo web_file_info;
- webkit_glue::PlatformFileInfoToWebFileInfo(file_info, &web_file_info);
- web_file_info.platformPath = webkit_base::FilePathToWebString(platform_path);
- callbacks->didReadMetadata(web_file_info);
-}
-
-void CreateSnapshotFileCallbackAdapter(
- WebKit::WebFileSystemCallbacks* callbacks,
- const base::PlatformFileInfo& file_info,
- const base::FilePath& platform_path) {
- WebFileInfo web_file_info;
- webkit_glue::PlatformFileInfoToWebFileInfo(file_info, &web_file_info);
- web_file_info.platformPath = webkit_base::FilePathToWebString(platform_path);
- callbacks->didCreateSnapshotFile(web_file_info);
-}
-
-void ReadDirectoryCallbackAdapater(
- WebKit::WebFileSystemCallbacks* callbacks,
- const std::vector<fileapi::DirectoryEntry>& entries,
- bool has_more) {
- WebVector<WebFileSystemEntry> file_system_entries(entries.size());
- for (size_t i = 0; i < entries.size(); i++) {
- file_system_entries[i].name =
- webkit_base::FilePathStringToWebString(entries[i].name);
- file_system_entries[i].isDirectory = entries[i].is_directory;
- }
- callbacks->didReadDirectory(file_system_entries, has_more);
-}
-
-void OpenFileSystemCallbackAdapter(
- WebKit::WebFileSystemCallbacks* callbacks,
- const std::string& name, const GURL& root) {
- callbacks->didOpenFileSystem(UTF8ToUTF16(name), root);
-}
-
-} // namespace content
« no previous file with comments | « content/common_child/fileapi/webfilesystem_callback_adapters.h ('k') | content/common_child/fileapi/webfilesystem_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698