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

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

Issue 6731033: Remove the path from PlatformFileInfo; it's cleaner just to pass it along as a (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/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 virtual void DidReadMetadata(const base::PlatformFileInfo&) { 26 virtual void DidReadMetadata(const base::PlatformFileInfo&, const FilePath&) {
27 NOTREACHED(); 27 NOTREACHED();
28 } 28 }
29 virtual void DidReadDirectory( 29 virtual void DidReadDirectory(
30 const std::vector<base::FileUtilProxy::Entry>& entries, 30 const std::vector<base::FileUtilProxy::Entry>& entries,
31 bool has_more) { 31 bool has_more) {
32 NOTREACHED(); 32 NOTREACHED();
33 } 33 }
34 virtual void DidOpenFileSystem(const std::string& name, 34 virtual void DidOpenFileSystem(const std::string& name,
35 const FilePath& root_path) { 35 const FilePath& root_path) {
36 NOTREACHED(); 36 NOTREACHED();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 void WebFileWriterImpl::DoWrite( 70 void WebFileWriterImpl::DoWrite(
71 const FilePath& path, const GURL& blob_url, int64 offset) { 71 const FilePath& path, const GURL& blob_url, int64 offset) {
72 GetFileSystemDispatcher()->Write(path, blob_url, offset, &request_id_, 72 GetFileSystemDispatcher()->Write(path, blob_url, offset, &request_id_,
73 new CallbackDispatcher(AsWeakPtr())); 73 new CallbackDispatcher(AsWeakPtr()));
74 } 74 }
75 75
76 void WebFileWriterImpl::DoCancel() { 76 void WebFileWriterImpl::DoCancel() {
77 GetFileSystemDispatcher()->Cancel(request_id_, 77 GetFileSystemDispatcher()->Cancel(request_id_,
78 new CallbackDispatcher(AsWeakPtr())); 78 new CallbackDispatcher(AsWeakPtr()));
79 } 79 }
OLDNEW
« no previous file with comments | « content/common/file_system/webfilesystem_callback_dispatcher.cc ('k') | content/common/file_system_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698