OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/chromeos/file_system_provider/operations/abort.h" | 5 #include "chrome/browser/chromeos/file_system_provider/operations/abort.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "chrome/common/extensions/api/file_system_provider.h" | 9 #include "chrome/common/extensions/api/file_system_provider.h" |
10 #include "chrome/common/extensions/api/file_system_provider_internal.h" | 10 #include "chrome/common/extensions/api/file_system_provider_internal.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 options.request_id = request_id; | 33 options.request_id = request_id; |
34 options.operation_request_id = operation_request_id_; | 34 options.operation_request_id = operation_request_id_; |
35 | 35 |
36 return SendEvent( | 36 return SendEvent( |
37 request_id, extensions::events::FILE_SYSTEM_PROVIDER_ON_ABORT_REQUESTED, | 37 request_id, extensions::events::FILE_SYSTEM_PROVIDER_ON_ABORT_REQUESTED, |
38 extensions::api::file_system_provider::OnAbortRequested::kEventName, | 38 extensions::api::file_system_provider::OnAbortRequested::kEventName, |
39 extensions::api::file_system_provider::OnAbortRequested::Create(options)); | 39 extensions::api::file_system_provider::OnAbortRequested::Create(options)); |
40 } | 40 } |
41 | 41 |
42 void Abort::OnSuccess(int /* request_id */, | 42 void Abort::OnSuccess(int /* request_id */, |
43 scoped_ptr<RequestValue> /* result */, | 43 std::unique_ptr<RequestValue> /* result */, |
44 bool has_more) { | 44 bool has_more) { |
45 callback_.Run(base::File::FILE_OK); | 45 callback_.Run(base::File::FILE_OK); |
46 } | 46 } |
47 | 47 |
48 void Abort::OnError(int /* request_id */, | 48 void Abort::OnError(int /* request_id */, |
49 scoped_ptr<RequestValue> /* result */, | 49 std::unique_ptr<RequestValue> /* result */, |
50 base::File::Error error) { | 50 base::File::Error error) { |
51 callback_.Run(error); | 51 callback_.Run(error); |
52 } | 52 } |
53 | 53 |
54 } // namespace operations | 54 } // namespace operations |
55 } // namespace file_system_provider | 55 } // namespace file_system_provider |
56 } // namespace chromeos | 56 } // namespace chromeos |
OLD | NEW |