1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/chromeos/file_system_provider/operations/configure.h"
7 #include "base/values.h"
8 #include "chrome/common/extensions/api/file_system_provider.h"
11 namespace file_system_provider
{
12 namespace operations
{
14 Configure::Configure(extensions::EventRouter
* event_router
,
15 const ProvidedFileSystemInfo
& file_system_info
,
16 const storage::AsyncFileUtil::StatusCallback
& callback
)
17 : Operation(event_router
, file_system_info
), callback_(callback
) {
20 Configure::~Configure() {
23 bool Configure::Execute(int request_id
) {
24 using extensions::api::file_system_provider::ConfigureRequestedOptions
;
26 ConfigureRequestedOptions options
;
27 options
.file_system_id
= file_system_info_
.file_system_id();
28 options
.request_id
= request_id
;
32 extensions::events::FILE_SYSTEM_PROVIDER_ON_CONFIGURE_REQUESTED
,
33 extensions::api::file_system_provider::OnConfigureRequested::kEventName
,
34 extensions::api::file_system_provider::OnConfigureRequested::Create(
38 void Configure::OnSuccess(int /* request_id */,
39 scoped_ptr
<RequestValue
> /* result */,
40 bool /* has_more */) {
41 callback_
.Run(base::File::FILE_OK
);
44 void Configure::OnError(int /* request_id */,
45 scoped_ptr
<RequestValue
> /* result */,
46 base::File::Error error
) {
50 } // namespace operations
51 } // namespace file_system_provider
52 } // namespace chromeos