| 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/provided_file_system.h" | 5 #include "chrome/browser/chromeos/file_system_provider/provided_file_system.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 using extensions::api::file_system_provider_internal:: | 91 using extensions::api::file_system_provider_internal:: |
| 92 OperationRequestedSuccess::Params; | 92 OperationRequestedSuccess::Params; |
| 93 std::unique_ptr<Params> params(Params::Create(value_as_list)); | 93 std::unique_ptr<Params> params(Params::Create(value_as_list)); |
| 94 ASSERT_TRUE(params.get()); | 94 ASSERT_TRUE(params.get()); |
| 95 file_system_->GetRequestManager()->FulfillRequest( | 95 file_system_->GetRequestManager()->FulfillRequest( |
| 96 request_id, | 96 request_id, |
| 97 RequestValue::CreateForOperationSuccess(std::move(params)), | 97 RequestValue::CreateForOperationSuccess(std::move(params)), |
| 98 false /* has_more */); | 98 false /* has_more */); |
| 99 } else { | 99 } else { |
| 100 file_system_->GetRequestManager()->RejectRequest( | 100 file_system_->GetRequestManager()->RejectRequest( |
| 101 request_id, base::WrapUnique(new RequestValue()), reply_result_); | 101 request_id, base::MakeUnique<RequestValue>(), reply_result_); |
| 102 } | 102 } |
| 103 } | 103 } |
| 104 | 104 |
| 105 void set_reply_result(base::File::Error result) { reply_result_ = result; } | 105 void set_reply_result(base::File::Error result) { reply_result_ = result; } |
| 106 | 106 |
| 107 private: | 107 private: |
| 108 ProvidedFileSystemInterface* const file_system_; // Not owned. | 108 ProvidedFileSystemInterface* const file_system_; // Not owned. |
| 109 base::File::Error reply_result_; | 109 base::File::Error reply_result_; |
| 110 DISALLOW_COPY_AND_ASSIGN(FakeEventRouter); | 110 DISALLOW_COPY_AND_ASSIGN(FakeEventRouter); |
| 111 }; | 111 }; |
| (...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 916 | 916 |
| 917 ASSERT_EQ(1u, close_log.size()); | 917 ASSERT_EQ(1u, close_log.size()); |
| 918 EXPECT_EQ(base::File::FILE_ERROR_NOT_FOUND, close_log[0]); | 918 EXPECT_EQ(base::File::FILE_ERROR_NOT_FOUND, close_log[0]); |
| 919 EXPECT_EQ(0u, opened_files.size()); | 919 EXPECT_EQ(0u, opened_files.size()); |
| 920 | 920 |
| 921 provided_file_system_->RemoveObserver(&observer); | 921 provided_file_system_->RemoveObserver(&observer); |
| 922 } | 922 } |
| 923 | 923 |
| 924 } // namespace file_system_provider | 924 } // namespace file_system_provider |
| 925 } // namespace chromeos | 925 } // namespace chromeos |
| OLD | NEW |