| 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/read_directory
.h" | 5 #include "chrome/browser/chromeos/file_system_provider/operations/read_directory
.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/memory/linked_ptr.h" | 9 #include "base/memory/linked_ptr.h" |
| 10 #include "chrome/common/extensions/api/file_system_provider.h" | 10 #include "chrome/common/extensions/api/file_system_provider.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 void ReadDirectory::OnSuccess(int /* request_id */, | 77 void ReadDirectory::OnSuccess(int /* request_id */, |
| 78 scoped_ptr<RequestValue> result, | 78 scoped_ptr<RequestValue> result, |
| 79 bool has_more) { | 79 bool has_more) { |
| 80 fileapi::AsyncFileUtil::EntryList entry_list; | 80 fileapi::AsyncFileUtil::EntryList entry_list; |
| 81 const bool convert_result = | 81 const bool convert_result = |
| 82 ConvertRequestValueToEntryList(result.Pass(), &entry_list); | 82 ConvertRequestValueToEntryList(result.Pass(), &entry_list); |
| 83 DCHECK(convert_result); | 83 DCHECK(convert_result); |
| 84 callback_.Run(base::File::FILE_OK, entry_list, has_more); | 84 callback_.Run(base::File::FILE_OK, entry_list, has_more); |
| 85 } | 85 } |
| 86 | 86 |
| 87 void ReadDirectory::OnError(int /* request_id */, base::File::Error error) { | 87 void ReadDirectory::OnError(int /* request_id */, |
| 88 scoped_ptr<RequestValue> /* result */, |
| 89 base::File::Error error) { |
| 88 callback_.Run( | 90 callback_.Run( |
| 89 error, fileapi::AsyncFileUtil::EntryList(), false /* has_more */); | 91 error, fileapi::AsyncFileUtil::EntryList(), false /* has_more */); |
| 90 } | 92 } |
| 91 | 93 |
| 92 } // namespace operations | 94 } // namespace operations |
| 93 } // namespace file_system_provider | 95 } // namespace file_system_provider |
| 94 } // namespace chromeos | 96 } // namespace chromeos |
| OLD | NEW |