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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 event->event_name == extensions::api::file_system_provider:: | 78 event->event_name == extensions::api::file_system_provider:: |
79 OnRemoveWatcherRequested::kEventName || | 79 OnRemoveWatcherRequested::kEventName || |
80 event->event_name == extensions::api::file_system_provider:: | 80 event->event_name == extensions::api::file_system_provider:: |
81 OnOpenFileRequested::kEventName || | 81 OnOpenFileRequested::kEventName || |
82 event->event_name == extensions::api::file_system_provider:: | 82 event->event_name == extensions::api::file_system_provider:: |
83 OnCloseFileRequested::kEventName); | 83 OnCloseFileRequested::kEventName); |
84 | 84 |
85 if (reply_result_ == base::File::FILE_OK) { | 85 if (reply_result_ == base::File::FILE_OK) { |
86 base::ListValue value_as_list; | 86 base::ListValue value_as_list; |
87 value_as_list.Set(0, new base::StringValue(kFileSystemId)); | 87 value_as_list.Set(0, new base::StringValue(kFileSystemId)); |
88 value_as_list.Set(1, new base::FundamentalValue(request_id)); | 88 value_as_list.Set(1, new base::Value(request_id)); |
89 value_as_list.Set(2, new base::FundamentalValue(0) /* execution_time */); | 89 value_as_list.Set(2, new base::Value(0) /* execution_time */); |
90 | 90 |
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 { |
(...skipping 816 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 |