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

Unified Diff: chrome/browser/chromeos/file_system_provider/operations/delete_entry.cc

Issue 1093383002: [WIP] Provided file system from NACL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Various cleanups Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/file_system_provider/operations/delete_entry.cc
diff --git a/chrome/browser/chromeos/file_system_provider/operations/delete_entry.cc b/chrome/browser/chromeos/file_system_provider/operations/delete_entry.cc
index e44c2d170337ab40eee97b2648423ae19e79e714..eb518315b2e2463e7246f1f35184cb92275ade95 100644
--- a/chrome/browser/chromeos/file_system_provider/operations/delete_entry.cc
+++ b/chrome/browser/chromeos/file_system_provider/operations/delete_entry.cc
@@ -13,51 +13,60 @@ namespace chromeos {
namespace file_system_provider {
namespace operations {
-DeleteEntry::DeleteEntry(extensions::EventRouter* event_router,
- const ProvidedFileSystemInfo& file_system_info,
- const base::FilePath& entry_path,
- bool recursive,
- const storage::AsyncFileUtil::StatusCallback& callback)
- : Operation(event_router, file_system_info),
+template <int source>
+DeleteEntry<source>::DeleteEntry(
+ typename Operation<source>::EventRouterType* event_router,
+ const ProvidedFileSystemInfo& file_system_info,
+ const base::FilePath& entry_path,
+ bool recursive,
+ const storage::AsyncFileUtil::StatusCallback& callback)
+ : Operation<source>(event_router, file_system_info),
entry_path_(entry_path),
recursive_(recursive),
callback_(callback) {
}
-DeleteEntry::~DeleteEntry() {
+template <int source>
+DeleteEntry<source>::~DeleteEntry() {
}
-bool DeleteEntry::Execute(int request_id) {
+template <int source>
+bool DeleteEntry<source>::Execute(int request_id) {
using extensions::api::file_system_provider::DeleteEntryRequestedOptions;
- if (!file_system_info_.writable())
+ if (!this->file_system_info_.writable())
return false;
DeleteEntryRequestedOptions options;
- options.file_system_id = file_system_info_.file_system_id();
+ options.file_system_id = this->file_system_info_.file_system_id();
options.request_id = request_id;
options.entry_path = entry_path_.AsUTF8Unsafe();
options.recursive = recursive_;
- return SendEvent(
+ return this->SendEvent(
request_id,
extensions::api::file_system_provider::OnDeleteEntryRequested::kEventName,
extensions::api::file_system_provider::OnDeleteEntryRequested::Create(
options));
}
-void DeleteEntry::OnSuccess(int /* request_id */,
- scoped_ptr<RequestValue> /* result */,
- bool has_more) {
+template <int source>
+void DeleteEntry<source>::OnSuccess(int /* request_id */,
+ scoped_ptr<RequestValue> /* result */,
+ bool has_more) {
callback_.Run(base::File::FILE_OK);
}
-void DeleteEntry::OnError(int /* request_id */,
- scoped_ptr<RequestValue> /* result */,
- base::File::Error error) {
+template <int source>
+void DeleteEntry<source>::OnError(int /* request_id */,
+ scoped_ptr<RequestValue> /* result */,
+ base::File::Error error) {
callback_.Run(error);
}
+template class DeleteEntry<Source_Type::extension>;
+template class DeleteEntry<Source_Type::plugin>;
+
} // namespace operations
} // namespace file_system_provider
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698