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

Side by Side Diff: webkit/chromeos/fileapi/remote_file_system_operation.cc

Issue 9662041: Implement copy and move operations within the same remote file system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: rebase to HEAD Created 8 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "webkit/chromeos/fileapi/remote_file_system_operation.h" 5 #include "webkit/chromeos/fileapi/remote_file_system_operation.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "base/platform_file.h" 9 #include "base/platform_file.h"
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 74
75 void RemoteFileSystemOperation::CreateFile(const GURL& path, 75 void RemoteFileSystemOperation::CreateFile(const GURL& path,
76 bool exclusive, 76 bool exclusive,
77 const StatusCallback& callback) { 77 const StatusCallback& callback) {
78 NOTIMPLEMENTED(); 78 NOTIMPLEMENTED();
79 } 79 }
80 80
81 void RemoteFileSystemOperation::Copy(const GURL& src_path, 81 void RemoteFileSystemOperation::Copy(const GURL& src_path,
82 const GURL& dest_path, 82 const GURL& dest_path,
83 const StatusCallback& callback) { 83 const StatusCallback& callback) {
84 NOTIMPLEMENTED(); 84 DCHECK(SetPendingOperationType(kOperationCopy));
85
86 remote_proxy_->Copy(src_path, dest_path,
87 base::Bind(&RemoteFileSystemOperation::DidFinishFileOperation,
88 base::Owned(this), callback));
85 } 89 }
86 90
87 void RemoteFileSystemOperation::Move(const GURL& src_path, 91 void RemoteFileSystemOperation::Move(const GURL& src_path,
88 const GURL& dest_path, 92 const GURL& dest_path,
89 const StatusCallback& callback) { 93 const StatusCallback& callback) {
90 NOTIMPLEMENTED(); 94 DCHECK(SetPendingOperationType(kOperationMove));
95
96 remote_proxy_->Move(src_path, dest_path,
97 base::Bind(&RemoteFileSystemOperation::DidFinishFileOperation,
98 base::Owned(this), callback));
91 } 99 }
92 100
93 void RemoteFileSystemOperation::Write( 101 void RemoteFileSystemOperation::Write(
94 const net::URLRequestContext* url_request_context, 102 const net::URLRequestContext* url_request_context,
95 const GURL& path, 103 const GURL& path,
96 const GURL& blob_url, 104 const GURL& blob_url,
97 int64 offset, 105 int64 offset,
98 const WriteCallback& callback) { 106 const WriteCallback& callback) {
99 NOTIMPLEMENTED(); 107 NOTIMPLEMENTED();
100 } 108 }
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 callback.Run(rv, entries, has_more /* has_more */); 187 callback.Run(rv, entries, has_more /* has_more */);
180 } 188 }
181 189
182 void RemoteFileSystemOperation::DidFinishFileOperation( 190 void RemoteFileSystemOperation::DidFinishFileOperation(
183 const StatusCallback& callback, 191 const StatusCallback& callback,
184 base::PlatformFileError rv) { 192 base::PlatformFileError rv) {
185 callback.Run(rv); 193 callback.Run(rv);
186 } 194 }
187 195
188 } // namespace chromeos 196 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_mock.cc ('k') | webkit/chromeos/fileapi/remote_file_system_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698