| Index: chrome/browser/chromeos/file_system_provider/operations/configure.cc
|
| diff --git a/chrome/browser/chromeos/file_system_provider/operations/configure.cc b/chrome/browser/chromeos/file_system_provider/operations/configure.cc
|
| index c2b7d68467343d560370785aea161d93f49dc2dd..ec5ec612d6fe92ecb771865230d40689866c90e9 100644
|
| --- a/chrome/browser/chromeos/file_system_provider/operations/configure.cc
|
| +++ b/chrome/browser/chromeos/file_system_provider/operations/configure.cc
|
| @@ -11,41 +11,49 @@ namespace chromeos {
|
| namespace file_system_provider {
|
| namespace operations {
|
|
|
| -Configure::Configure(extensions::EventRouter* event_router,
|
| - const ProvidedFileSystemInfo& file_system_info,
|
| - const storage::AsyncFileUtil::StatusCallback& callback)
|
| - : Operation(event_router, file_system_info), callback_(callback) {
|
| +template <class DestinationPolicy>
|
| +Configure<DestinationPolicy>::Configure(
|
| + typename DestinationPolicy::EventRouterType* event_router,
|
| + const ProvidedFileSystemInfo& file_system_info,
|
| + const storage::AsyncFileUtil::StatusCallback& callback)
|
| + : Operation<DestinationPolicy>(event_router, file_system_info),
|
| + callback_(callback) {
|
| }
|
| -
|
| -Configure::~Configure() {
|
| +template <class DestinationPolicy>
|
| +Configure<DestinationPolicy>::~Configure() {
|
| }
|
|
|
| -bool Configure::Execute(int request_id) {
|
| +template <class DestinationPolicy>
|
| +bool Configure<DestinationPolicy>::Execute(int request_id) {
|
| using extensions::api::file_system_provider::ConfigureRequestedOptions;
|
|
|
| ConfigureRequestedOptions 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::OnConfigureRequested::kEventName,
|
| extensions::api::file_system_provider::OnConfigureRequested::Create(
|
| options));
|
| }
|
|
|
| -void Configure::OnSuccess(int /* request_id */,
|
| - scoped_ptr<RequestValue> /* result */,
|
| - bool /* has_more */) {
|
| +template <class DestinationPolicy>
|
| +void Configure<DestinationPolicy>::OnSuccess(int /* request_id */,
|
| + scoped_ptr<RequestValue> /* result */,
|
| + bool /* has_more */) {
|
| callback_.Run(base::File::FILE_OK);
|
| }
|
|
|
| -void Configure::OnError(int /* request_id */,
|
| - scoped_ptr<RequestValue> /* result */,
|
| - base::File::Error error) {
|
| +template <class DestinationPolicy>
|
| +void Configure<DestinationPolicy>::OnError(int /* request_id */,
|
| + scoped_ptr<RequestValue> /* result */,
|
| + base::File::Error error) {
|
| callback_.Run(error);
|
| }
|
|
|
| +FOR_EACH_DESTINATION_SPECIALIZE(Configure)
|
| +
|
| } // namespace operations
|
| } // namespace file_system_provider
|
| } // namespace chromeos
|
|
|