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

Side by Side Diff: content/common/file_system/webfilesystem_callback_dispatcher.cc

Issue 6767010: More filesystem cleanup: convert URL-encoded-as-FilePath to actual URL, where (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/file_system/webfilesystem_callback_dispatcher.h" 5 #include "content/common/file_system/webfilesystem_callback_dispatcher.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/file_util_proxy.h" 10 #include "base/file_util_proxy.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/utf_string_conversions.h" 12 #include "base/utf_string_conversions.h"
13 #include "googleurl/src/gurl.h"
13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h" 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h"
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystem.h" 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystem.h"
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallback s.h" 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallback s.h"
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
17 #include "webkit/glue/webkit_glue.h" 18 #include "webkit/glue/webkit_glue.h"
18 19
19 using WebKit::WebFileInfo; 20 using WebKit::WebFileInfo;
20 using WebKit::WebFileSystemCallbacks; 21 using WebKit::WebFileSystemCallbacks;
21 using WebKit::WebFileSystemEntry; 22 using WebKit::WebFileSystemEntry;
22 using WebKit::WebString; 23 using WebKit::WebString;
(...skipping 28 matching lines...) Expand all
51 WebVector<WebFileSystemEntry> file_system_entries(entries.size()); 52 WebVector<WebFileSystemEntry> file_system_entries(entries.size());
52 for (size_t i = 0; i < entries.size(); i++) { 53 for (size_t i = 0; i < entries.size(); i++) {
53 file_system_entries[i].name = 54 file_system_entries[i].name =
54 webkit_glue::FilePathStringToWebString(entries[i].name); 55 webkit_glue::FilePathStringToWebString(entries[i].name);
55 file_system_entries[i].isDirectory = entries[i].is_directory; 56 file_system_entries[i].isDirectory = entries[i].is_directory;
56 } 57 }
57 callbacks_->didReadDirectory(file_system_entries, has_more); 58 callbacks_->didReadDirectory(file_system_entries, has_more);
58 } 59 }
59 60
60 void WebFileSystemCallbackDispatcher::DidOpenFileSystem( 61 void WebFileSystemCallbackDispatcher::DidOpenFileSystem(
61 const std::string& name, const FilePath& root_path) { 62 const std::string& name, const GURL& root) {
62 callbacks_->didOpenFileSystem(UTF8ToUTF16(name), 63 callbacks_->didOpenFileSystem(
63 webkit_glue::FilePathToWebString(root_path)); 64 UTF8ToUTF16(name), UTF8ToUTF16(root.spec()));
64 } 65 }
65 66
66 void WebFileSystemCallbackDispatcher::DidFail( 67 void WebFileSystemCallbackDispatcher::DidFail(
67 base::PlatformFileError error_code) { 68 base::PlatformFileError error_code) {
68 callbacks_->didFail( 69 callbacks_->didFail(
69 webkit_glue::PlatformFileErrorToWebFileError(error_code)); 70 webkit_glue::PlatformFileErrorToWebFileError(error_code));
70 } 71 }
71 72
72 void WebFileSystemCallbackDispatcher::DidWrite(int64 bytes, bool complete) { 73 void WebFileSystemCallbackDispatcher::DidWrite(int64 bytes, bool complete) {
73 NOTREACHED(); 74 NOTREACHED();
74 } 75 }
OLDNEW
« no previous file with comments | « content/common/file_system/webfilesystem_callback_dispatcher.h ('k') | content/common/file_system/webfilesystem_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698