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

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

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 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTEM_H _ 5 #ifndef CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTEM_H _
6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTEM_H _ 6 #define CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTEM_H _
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 bool exclusive, 62 bool exclusive,
63 bool recursive, 63 bool recursive,
64 const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE; 64 const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE;
65 virtual void DeleteEntry( 65 virtual void DeleteEntry(
66 const base::FilePath& entry_path, 66 const base::FilePath& entry_path,
67 bool recursive, 67 bool recursive,
68 const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE; 68 const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE;
69 virtual void CreateFile( 69 virtual void CreateFile(
70 const base::FilePath& file_path, 70 const base::FilePath& file_path,
71 const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE; 71 const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE;
72 virtual void CopyEntry(
73 const base::FilePath& source_path,
74 const base::FilePath& target_path,
75 const fileapi::AsyncFileUtil::StatusCallback& callback) OVERRIDE;
72 virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const OVERRIDE; 76 virtual const ProvidedFileSystemInfo& GetFileSystemInfo() const OVERRIDE;
73 virtual RequestManager* GetRequestManager() OVERRIDE; 77 virtual RequestManager* GetRequestManager() OVERRIDE;
74 virtual base::WeakPtr<ProvidedFileSystemInterface> GetWeakPtr() OVERRIDE; 78 virtual base::WeakPtr<ProvidedFileSystemInterface> GetWeakPtr() OVERRIDE;
75 79
76 // Factory callback, to be used in Service::SetFileSystemFactory(). The 80 // Factory callback, to be used in Service::SetFileSystemFactory(). The
77 // |event_router| argument can be NULL. 81 // |event_router| argument can be NULL.
78 static ProvidedFileSystemInterface* Create( 82 static ProvidedFileSystemInterface* Create(
79 Profile* profile, 83 Profile* profile,
80 const ProvidedFileSystemInfo& file_system_info); 84 const ProvidedFileSystemInfo& file_system_info);
81 85
82 private: 86 private:
83 typedef std::map<int, base::FilePath> OpenedFilesMap; 87 typedef std::map<int, base::FilePath> OpenedFilesMap;
84 88
85 ProvidedFileSystemInfo file_system_info_; 89 ProvidedFileSystemInfo file_system_info_;
86 OpenedFilesMap opened_files_; 90 OpenedFilesMap opened_files_;
87 int last_file_handle_; 91 int last_file_handle_;
88 92
89 base::WeakPtrFactory<ProvidedFileSystemInterface> weak_ptr_factory_; 93 base::WeakPtrFactory<ProvidedFileSystemInterface> weak_ptr_factory_;
90 DISALLOW_COPY_AND_ASSIGN(FakeProvidedFileSystem); 94 DISALLOW_COPY_AND_ASSIGN(FakeProvidedFileSystem);
91 }; 95 };
92 96
93 } // namespace file_system_provider 97 } // namespace file_system_provider
94 } // namespace chromeos 98 } // namespace chromeos
95 99
96 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTE M_H_ 100 #endif // CHROME_BROWSER_CHROMEOS_FILE_SYSTEM_PROVIDER_FAKE_PROVIDED_FILE_SYSTE M_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698