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

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

Issue 6864040: Fixed file/directory url resolution for external mount point provider. (Closed) Base URL: svn://svn.chromium.org/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/webfilewriter_impl.h" 5 #include "content/common/file_system/webfilewriter_impl.h"
6 6
7 #include "content/common/child_thread.h" 7 #include "content/common/child_thread.h"
8 #include "content/common/file_system/file_system_dispatcher.h" 8 #include "content/common/file_system/file_system_dispatcher.h"
9 9
10 namespace { 10 namespace {
11 11
12 inline FileSystemDispatcher* GetFileSystemDispatcher() { 12 inline FileSystemDispatcher* GetFileSystemDispatcher() {
13 return ChildThread::current()->file_system_dispatcher(); 13 return ChildThread::current()->file_system_dispatcher();
14 } 14 }
15 } 15 }
16 16
17 class WebFileWriterImpl::CallbackDispatcher 17 class WebFileWriterImpl::CallbackDispatcher
18 : public fileapi::FileSystemCallbackDispatcher { 18 : public fileapi::FileSystemCallbackDispatcher {
19 public: 19 public:
20 explicit CallbackDispatcher( 20 explicit CallbackDispatcher(
21 const base::WeakPtr<WebFileWriterImpl>& writer) : writer_(writer) { 21 const base::WeakPtr<WebFileWriterImpl>& writer) : writer_(writer) {
22 } 22 }
23 virtual ~CallbackDispatcher() { 23 virtual ~CallbackDispatcher() {
24 } 24 }
25 25
26
27 virtual void DidGetLocalPath(const FilePath& local_path) {
28 NOTREACHED();
29 }
26 virtual void DidReadMetadata(const base::PlatformFileInfo&, const FilePath&) { 30 virtual void DidReadMetadata(const base::PlatformFileInfo&, const FilePath&) {
27 NOTREACHED(); 31 NOTREACHED();
28 } 32 }
29 virtual void DidReadDirectory( 33 virtual void DidReadDirectory(
30 const std::vector<base::FileUtilProxy::Entry>& entries, 34 const std::vector<base::FileUtilProxy::Entry>& entries,
31 bool has_more) { 35 bool has_more) {
32 NOTREACHED(); 36 NOTREACHED();
33 } 37 }
34 virtual void DidOpenFileSystem(const std::string& name, 38 virtual void DidOpenFileSystem(const std::string& name,
35 const GURL& root) { 39 const GURL& root) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 const GURL& path, const GURL& blob_url, int64 offset) { 75 const GURL& path, const GURL& blob_url, int64 offset) {
72 GetFileSystemDispatcher()->Write( 76 GetFileSystemDispatcher()->Write(
73 path, blob_url, offset, &request_id_, 77 path, blob_url, offset, &request_id_,
74 new CallbackDispatcher(AsWeakPtr())); 78 new CallbackDispatcher(AsWeakPtr()));
75 } 79 }
76 80
77 void WebFileWriterImpl::DoCancel() { 81 void WebFileWriterImpl::DoCancel() {
78 GetFileSystemDispatcher()->Cancel(request_id_, 82 GetFileSystemDispatcher()->Cancel(request_id_,
79 new CallbackDispatcher(AsWeakPtr())); 83 new CallbackDispatcher(AsWeakPtr()));
80 } 84 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698