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

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

Issue 7820005: Clean up old dead code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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
« no previous file with comments | « no previous file | content/common/file_system/webfilesystem_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "googleurl/src/gurl.h"
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h" 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h"
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystem.h" 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystem.h"
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallback s.h" 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallback s.h"
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h"
19 #include "webkit/glue/webkit_glue.h" 18 #include "webkit/glue/webkit_glue.h"
20 19
21 using WebKit::WebFileInfo; 20 using WebKit::WebFileInfo;
22 using WebKit::WebFileSystemCallbacks; 21 using WebKit::WebFileSystemCallbacks;
23 using WebKit::WebFileSystemEntry; 22 using WebKit::WebFileSystemEntry;
24 using WebKit::WebString; 23 using WebKit::WebString;
25 using WebKit::WebURL;
26 using WebKit::WebVector; 24 using WebKit::WebVector;
27 25
28 WebFileSystemCallbackDispatcher::WebFileSystemCallbackDispatcher( 26 WebFileSystemCallbackDispatcher::WebFileSystemCallbackDispatcher(
29 WebFileSystemCallbacks* callbacks) 27 WebFileSystemCallbacks* callbacks)
30 : callbacks_(callbacks) { 28 : callbacks_(callbacks) {
31 DCHECK(callbacks_); 29 DCHECK(callbacks_);
32 } 30 }
33 31
34 void WebFileSystemCallbackDispatcher::DidSucceed() { 32 void WebFileSystemCallbackDispatcher::DidSucceed() {
35 callbacks_->didSucceed(); 33 callbacks_->didSucceed();
(...skipping 19 matching lines...) Expand all
55 for (size_t i = 0; i < entries.size(); i++) { 53 for (size_t i = 0; i < entries.size(); i++) {
56 file_system_entries[i].name = 54 file_system_entries[i].name =
57 webkit_glue::FilePathStringToWebString(entries[i].name); 55 webkit_glue::FilePathStringToWebString(entries[i].name);
58 file_system_entries[i].isDirectory = entries[i].is_directory; 56 file_system_entries[i].isDirectory = entries[i].is_directory;
59 } 57 }
60 callbacks_->didReadDirectory(file_system_entries, has_more); 58 callbacks_->didReadDirectory(file_system_entries, has_more);
61 } 59 }
62 60
63 void WebFileSystemCallbackDispatcher::DidOpenFileSystem( 61 void WebFileSystemCallbackDispatcher::DidOpenFileSystem(
64 const std::string& name, const GURL& root) { 62 const std::string& name, const GURL& root) {
65 // Temporary hack to ease a 4-phase Chromium/WebKit commit.
66 #ifdef WEBFILESYSTEMCALLBACKS_USE_URL_NOT_STRING
67 callbacks_->didOpenFileSystem(UTF8ToUTF16(name), root); 63 callbacks_->didOpenFileSystem(UTF8ToUTF16(name), root);
68 #else
69 callbacks_->didOpenFileSystem(UTF8ToUTF16(name), UTF8ToUTF16(root.spec()));
70 #endif
71 } 64 }
72 65
73 void WebFileSystemCallbackDispatcher::DidFail( 66 void WebFileSystemCallbackDispatcher::DidFail(
74 base::PlatformFileError error_code) { 67 base::PlatformFileError error_code) {
75 callbacks_->didFail( 68 callbacks_->didFail(
76 webkit_glue::PlatformFileErrorToWebFileError(error_code)); 69 webkit_glue::PlatformFileErrorToWebFileError(error_code));
77 } 70 }
78 71
79 void WebFileSystemCallbackDispatcher::DidWrite(int64 bytes, bool complete) { 72 void WebFileSystemCallbackDispatcher::DidWrite(int64 bytes, bool complete) {
80 NOTREACHED(); 73 NOTREACHED();
81 } 74 }
OLDNEW
« no previous file with comments | « no previous file | content/common/file_system/webfilesystem_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698