Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Unified Diff: mojo/edk/test/test_utils.h

Issue 1350023003: Add a Mojo EDK for Chrome that uses one OS pipe per message pipe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more cleanup Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/edk/test/test_utils.h
diff --git a/third_party/mojo/src/mojo/edk/test/test_utils.h b/mojo/edk/test/test_utils.h
similarity index 67%
copy from third_party/mojo/src/mojo/edk/test/test_utils.h
copy to mojo/edk/test/test_utils.h
index 355135a5be4743a62f0a7cef56b6e21ba8b30e9e..939171b26f88e7f5f088db76fbad2795f94d6d16 100644
--- a/third_party/mojo/src/mojo/edk/test/test_utils.h
+++ b/mojo/edk/test/test_utils.h
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef THIRD_PARTY_MOJO_SRC_MOJO_EDK_TEST_TEST_UTILS_H_
-#define THIRD_PARTY_MOJO_SRC_MOJO_EDK_TEST_TEST_UTILS_H_
+#ifndef MOJO_EDK_TEST_TEST_UTILS_H_
+#define MOJO_EDK_TEST_TEST_UTILS_H_
#include <stddef.h>
#include <stdio.h>
@@ -11,22 +11,23 @@
#include <string>
#include "base/files/scoped_file.h"
-#include "third_party/mojo/src/mojo/edk/embedder/platform_handle.h"
-#include "third_party/mojo/src/mojo/edk/embedder/scoped_platform_handle.h"
+#include "mojo/edk/embedder/platform_handle.h"
+#include "mojo/edk/embedder/scoped_platform_handle.h"
namespace mojo {
+namespace edk {
namespace test {
// On success, |bytes_written| is updated to the number of bytes written;
// otherwise it is untouched.
-bool BlockingWrite(const embedder::PlatformHandle& handle,
+bool BlockingWrite(const PlatformHandle& handle,
const void* buffer,
size_t bytes_to_write,
size_t* bytes_written);
// On success, |bytes_read| is updated to the number of bytes read; otherwise it
// is untouched.
-bool BlockingRead(const embedder::PlatformHandle& handle,
+bool BlockingRead(const PlatformHandle& handle,
void* buffer,
size_t buffer_size,
size_t* bytes_read);
@@ -35,19 +36,20 @@ bool BlockingRead(const embedder::PlatformHandle& handle,
// and updates |bytes_read| to the number of bytes read (0 if the read would
// block); otherwise it returns false and leaves |bytes_read| untouched.
// |handle| must already be in non-blocking mode.
-bool NonBlockingRead(const embedder::PlatformHandle& handle,
+bool NonBlockingRead(const PlatformHandle& handle,
void* buffer,
size_t buffer_size,
size_t* bytes_read);
// Gets a (scoped) |PlatformHandle| from the given (scoped) |FILE|.
-embedder::ScopedPlatformHandle PlatformHandleFromFILE(base::ScopedFILE fp);
+ScopedPlatformHandle PlatformHandleFromFILE(base::ScopedFILE fp);
// Gets a (scoped) |FILE| from a (scoped) |PlatformHandle|.
-base::ScopedFILE FILEFromPlatformHandle(embedder::ScopedPlatformHandle h,
+base::ScopedFILE FILEFromPlatformHandle(ScopedPlatformHandle h,
const char* mode);
} // namespace test
+} // namespace edk
} // namespace mojo
-#endif // THIRD_PARTY_MOJO_SRC_MOJO_EDK_TEST_TEST_UTILS_H_
+#endif // MOJO_EDK_TEST_TEST_UTILS_H_

Powered by Google App Engine
This is Rietveld 408576698