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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 OnAddWatcherRequested::kEventName || | 76 OnAddWatcherRequested::kEventName || |
77 event->event_name == extensions::api::file_system_provider:: | 77 event->event_name == extensions::api::file_system_provider:: |
78 OnRemoveWatcherRequested::kEventName || | 78 OnRemoveWatcherRequested::kEventName || |
79 event->event_name == extensions::api::file_system_provider:: | 79 event->event_name == extensions::api::file_system_provider:: |
80 OnOpenFileRequested::kEventName || | 80 OnOpenFileRequested::kEventName || |
81 event->event_name == extensions::api::file_system_provider:: | 81 event->event_name == extensions::api::file_system_provider:: |
82 OnCloseFileRequested::kEventName); | 82 OnCloseFileRequested::kEventName); |
83 | 83 |
84 if (reply_result_ == base::File::FILE_OK) { | 84 if (reply_result_ == base::File::FILE_OK) { |
85 base::ListValue value_as_list; | 85 base::ListValue value_as_list; |
86 value_as_list.Set(0, base::MakeUnique<base::Value>(kFileSystemId)); | 86 value_as_list.Set(0, new base::Value(kFileSystemId)); |
87 value_as_list.Set(1, base::MakeUnique<base::Value>(request_id)); | 87 value_as_list.Set(1, new base::Value(request_id)); |
88 value_as_list.Set(2, | 88 value_as_list.Set(2, new base::Value(0) /* execution_time */); |
89 base::MakeUnique<base::Value>(0) /* execution_time */); | |
90 | 89 |
91 using extensions::api::file_system_provider_internal:: | 90 using extensions::api::file_system_provider_internal:: |
92 OperationRequestedSuccess::Params; | 91 OperationRequestedSuccess::Params; |
93 std::unique_ptr<Params> params(Params::Create(value_as_list)); | 92 std::unique_ptr<Params> params(Params::Create(value_as_list)); |
94 ASSERT_TRUE(params.get()); | 93 ASSERT_TRUE(params.get()); |
95 file_system_->GetRequestManager()->FulfillRequest( | 94 file_system_->GetRequestManager()->FulfillRequest( |
96 request_id, | 95 request_id, |
97 RequestValue::CreateForOperationSuccess(std::move(params)), | 96 RequestValue::CreateForOperationSuccess(std::move(params)), |
98 false /* has_more */); | 97 false /* has_more */); |
99 } else { | 98 } else { |
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
917 | 916 |
918 ASSERT_EQ(1u, close_log.size()); | 917 ASSERT_EQ(1u, close_log.size()); |
919 EXPECT_EQ(base::File::FILE_ERROR_NOT_FOUND, close_log[0]); | 918 EXPECT_EQ(base::File::FILE_ERROR_NOT_FOUND, close_log[0]); |
920 EXPECT_EQ(0u, opened_files.size()); | 919 EXPECT_EQ(0u, opened_files.size()); |
921 | 920 |
922 provided_file_system_->RemoveObserver(&observer); | 921 provided_file_system_->RemoveObserver(&observer); |
923 } | 922 } |
924 | 923 |
925 } // namespace file_system_provider | 924 } // namespace file_system_provider |
926 } // namespace chromeos | 925 } // namespace chromeos |
OLD | NEW |