BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / chrome / browser / chromeos / file_system_provider / operations / configure.cc
blob3ecadeea80362b16059320b3615ffadd699da5d4
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"
10 namespace chromeos {
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;
30 return SendEvent(
31 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(
35 options));
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) {
47 callback_.Run(error);
50 } // namespace operations
51 } // namespace file_system_provider
52 } // namespace chromeos