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

Unified Diff: chrome/browser/chromeos/file_system_provider/operations/unmount.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/unmount.cc
diff --git a/chrome/browser/chromeos/file_system_provider/operations/unmount.cc b/chrome/browser/chromeos/file_system_provider/operations/unmount.cc
index c40f969c845d575dae30aa7d9962ab15c21967e9..f060e6de0d32303029619933aeffbd4c42e0768d 100644
--- a/chrome/browser/chromeos/file_system_provider/operations/unmount.cc
+++ b/chrome/browser/chromeos/file_system_provider/operations/unmount.cc
@@ -11,41 +11,50 @@ namespace chromeos {
namespace file_system_provider {
namespace operations {
-Unmount::Unmount(extensions::EventRouter* event_router,
- const ProvidedFileSystemInfo& file_system_info,
- const storage::AsyncFileUtil::StatusCallback& callback)
- : Operation(event_router, file_system_info), callback_(callback) {
+template <int source>
+Unmount<source>::Unmount(
+ typename Operation<source>::EventRouterType* event_router,
+ const ProvidedFileSystemInfo& file_system_info,
+ const storage::AsyncFileUtil::StatusCallback& callback)
+ : Operation<source>(event_router, file_system_info), callback_(callback) {
}
-Unmount::~Unmount() {
+template <int source>
+Unmount<source>::~Unmount() {
}
-bool Unmount::Execute(int request_id) {
+template <int source>
+bool Unmount<source>::Execute(int request_id) {
using extensions::api::file_system_provider::UnmountRequestedOptions;
UnmountRequestedOptions 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;
- return SendEvent(
+ return this->SendEvent(
request_id,
extensions::api::file_system_provider::OnUnmountRequested::kEventName,
extensions::api::file_system_provider::OnUnmountRequested::Create(
options));
}
-void Unmount::OnSuccess(int /* request_id */,
- scoped_ptr<RequestValue> /* result */,
- bool /* has_more */) {
+template <int source>
+void Unmount<source>::OnSuccess(int /* request_id */,
+ scoped_ptr<RequestValue> /* result */,
+ bool /* has_more */) {
callback_.Run(base::File::FILE_OK);
}
-void Unmount::OnError(int /* request_id */,
- scoped_ptr<RequestValue> /* result */,
- base::File::Error error) {
+template <int source>
+void Unmount<source>::OnError(int /* request_id */,
+ scoped_ptr<RequestValue> /* result */,
+ base::File::Error error) {
callback_.Run(error);
}
+template class Unmount<Source_Type::extension>;
+template class Unmount<Source_Type::plugin>;
+
} // namespace operations
} // namespace file_system_provider
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698