| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "files/public/c/tests/test_utils.h" | 5 #include "files/c/tests/test_utils.h" |
| 6 | 6 |
| 7 #include "files/public/c/lib/template_util.h" | 7 #include "files/c/lib/template_util.h" |
| 8 #include "files/public/interfaces/file.mojom.h" | 8 #include "files/interfaces/file.mojom.h" |
| 9 #include "files/public/interfaces/types.mojom.h" | 9 #include "files/interfaces/types.mojom.h" |
| 10 #include "mojo/public/cpp/environment/logging.h" | 10 #include "mojo/public/cpp/environment/logging.h" |
| 11 | 11 |
| 12 namespace mojio { | 12 namespace mojio { |
| 13 namespace test { | 13 namespace test { |
| 14 | 14 |
| 15 void MakeDirAt(mojo::files::DirectoryPtr* root, const char* path) { | 15 void MakeDirAt(mojo::files::DirectoryPtr* root, const char* path) { |
| 16 MOJO_CHECK(root); | 16 MOJO_CHECK(root); |
| 17 MOJO_CHECK(path); | 17 MOJO_CHECK(path); |
| 18 mojo::files::DirectoryPtr& dir = *root; | 18 mojo::files::DirectoryPtr& dir = *root; |
| 19 | 19 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 Capture(&error, &bytes_read)); | 94 Capture(&error, &bytes_read)); |
| 95 MOJO_CHECK(file.WaitForIncomingResponse()); | 95 MOJO_CHECK(file.WaitForIncomingResponse()); |
| 96 if (!bytes_read.size()) | 96 if (!bytes_read.size()) |
| 97 return std::string(); | 97 return std::string(); |
| 98 return std::string(reinterpret_cast<const char*>(&bytes_read[0]), | 98 return std::string(reinterpret_cast<const char*>(&bytes_read[0]), |
| 99 bytes_read.size()); | 99 bytes_read.size()); |
| 100 } | 100 } |
| 101 | 101 |
| 102 } // namespace test | 102 } // namespace test |
| 103 } // namespace mojio | 103 } // namespace mojio |
| OLD | NEW |