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

Side by Side Diff: chrome/browser/chromeos/file_system_provider/fake_provided_file_system.cc

Issue 384303002: [fsp] Add support for copying files within a provided file system. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chrome/browser/chromeos/file_system_provider/fake_provided_file_system .h" 5 #include "chrome/browser/chromeos/file_system_provider/fake_provided_file_system .h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/files/file.h" 9 #include "base/files/file.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 const base::FilePath& file_path, 248 const base::FilePath& file_path,
249 const fileapi::AsyncFileUtil::StatusCallback& callback) { 249 const fileapi::AsyncFileUtil::StatusCallback& callback) {
250 const base::File::Error result = file_path.AsUTF8Unsafe() != kFakeFilePath 250 const base::File::Error result = file_path.AsUTF8Unsafe() != kFakeFilePath
251 ? base::File::FILE_ERROR_EXISTS 251 ? base::File::FILE_ERROR_EXISTS
252 : base::File::FILE_OK; 252 : base::File::FILE_OK;
253 253
254 base::MessageLoopProxy::current()->PostTask(FROM_HERE, 254 base::MessageLoopProxy::current()->PostTask(FROM_HERE,
255 base::Bind(callback, result)); 255 base::Bind(callback, result));
256 } 256 }
257 257
258 void FakeProvidedFileSystem::CopyEntry(
259 const base::FilePath& source_path,
260 const base::FilePath& target_path,
261 const fileapi::AsyncFileUtil::StatusCallback& callback) {
262 base::MessageLoopProxy::current()->PostTask(
263 FROM_HERE, base::Bind(callback, base::File::FILE_OK));
264 }
265
258 const ProvidedFileSystemInfo& FakeProvidedFileSystem::GetFileSystemInfo() 266 const ProvidedFileSystemInfo& FakeProvidedFileSystem::GetFileSystemInfo()
259 const { 267 const {
260 return file_system_info_; 268 return file_system_info_;
261 } 269 }
262 270
263 RequestManager* FakeProvidedFileSystem::GetRequestManager() { 271 RequestManager* FakeProvidedFileSystem::GetRequestManager() {
264 NOTREACHED(); 272 NOTREACHED();
265 return NULL; 273 return NULL;
266 } 274 }
267 275
268 ProvidedFileSystemInterface* FakeProvidedFileSystem::Create( 276 ProvidedFileSystemInterface* FakeProvidedFileSystem::Create(
269 Profile* profile, 277 Profile* profile,
270 const ProvidedFileSystemInfo& file_system_info) { 278 const ProvidedFileSystemInfo& file_system_info) {
271 return new FakeProvidedFileSystem(file_system_info); 279 return new FakeProvidedFileSystem(file_system_info);
272 } 280 }
273 281
274 base::WeakPtr<ProvidedFileSystemInterface> 282 base::WeakPtr<ProvidedFileSystemInterface>
275 FakeProvidedFileSystem::GetWeakPtr() { 283 FakeProvidedFileSystem::GetWeakPtr() {
276 return weak_ptr_factory_.GetWeakPtr(); 284 return weak_ptr_factory_.GetWeakPtr();
277 } 285 }
278 286
279 } // namespace file_system_provider 287 } // namespace file_system_provider
280 } // namespace chromeos 288 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698