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

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

Issue 1093383002: [WIP] Provided file system from NACL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved several modules to chromeos folder. Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/file_system_provider/operations/remove_watcher.cc
diff --git a/chrome/browser/chromeos/file_system_provider/operations/remove_watcher.cc b/chrome/browser/chromeos/file_system_provider/operations/remove_watcher.cc
index 1e4e142bc7be153fe365cf2333401961dd918372..83e31cfd834c18e0457cbee3677433e92ad293d3 100644
--- a/chrome/browser/chromeos/file_system_provider/operations/remove_watcher.cc
+++ b/chrome/browser/chromeos/file_system_provider/operations/remove_watcher.cc
@@ -12,51 +12,56 @@
namespace chromeos {
namespace file_system_provider {
namespace operations {
-
-RemoveWatcher::RemoveWatcher(
- extensions::EventRouter* event_router,
+template <class DestinationPolicy>
+RemoveWatcher<DestinationPolicy>::RemoveWatcher(
+ typename DestinationPolicy::EventRouterType* 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),
+ : Operation<DestinationPolicy>(event_router, file_system_info),
entry_path_(entry_path),
recursive_(recursive),
callback_(callback) {
}
-RemoveWatcher::~RemoveWatcher() {
+template <class DestinationPolicy>
+RemoveWatcher<DestinationPolicy>::~RemoveWatcher() {
}
-bool RemoveWatcher::Execute(int request_id) {
+template <class DestinationPolicy>
+bool RemoveWatcher<DestinationPolicy>::Execute(int request_id) {
using extensions::api::file_system_provider::RemoveWatcherRequestedOptions;
RemoveWatcherRequestedOptions 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(
- request_id,
- extensions::api::file_system_provider::OnRemoveWatcherRequested::
- kEventName,
+ return this->SendEvent(
+ request_id, extensions::api::file_system_provider::
+ OnRemoveWatcherRequested::kEventName,
extensions::api::file_system_provider::OnRemoveWatcherRequested::Create(
options));
}
-void RemoveWatcher::OnSuccess(int /* request_id */,
- scoped_ptr<RequestValue> /* result */,
- bool has_more) {
+template <class DestinationPolicy>
+void RemoveWatcher<DestinationPolicy>::OnSuccess(int /* request_id */,
+ scoped_ptr<RequestValue> /* result */,
+ bool has_more) {
callback_.Run(base::File::FILE_OK);
}
-void RemoveWatcher::OnError(int /* request_id */,
- scoped_ptr<RequestValue> /* result */,
- base::File::Error error) {
+template <class DestinationPolicy>
+void RemoveWatcher<DestinationPolicy>::OnError(int /* request_id */,
+ scoped_ptr<RequestValue> /* result */,
+ base::File::Error error) {
callback_.Run(error);
}
+FOR_EACH_DESTINATION_SPECIALIZE(RemoveWatcher)
+
} // namespace operations
} // namespace file_system_provider
} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698