1 // Copyright 2014 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/unmount.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 Unmount::Unmount(extensions::EventRouter* event_router,
15 const ProvidedFileSystemInfo& file_system_info,
16 const fileapi::AsyncFileUtil::StatusCallback& callback)
17 : Operation(event_router, file_system_info), callback_(callback) {
23 bool Unmount::Execute(int request_id) {
24 scoped_ptr<base::DictionaryValue> values(new base::DictionaryValue);
27 extensions::api::file_system_provider::OnUnmountRequested::kEventName,
31 void Unmount::OnSuccess(int /* request_id */,
32 scoped_ptr<RequestValue> /* result */,
33 bool /* has_more */) {
34 callback_.Run(base::File::FILE_OK);
37 void Unmount::OnError(int /* request_id */, base::File::Error error) {
41 } // namespace operations
42 } // namespace file_system_provider
43 } // namespace chromeos