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

Unified Diff: mojo/edk/test/test_utils_posix.cc

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, 2 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_posix.cc
diff --git a/third_party/mojo/src/mojo/edk/test/test_utils_posix.cc b/mojo/edk/test/test_utils_posix.cc
similarity index 80%
copy from third_party/mojo/src/mojo/edk/test/test_utils_posix.cc
copy to mojo/edk/test/test_utils_posix.cc
index 9fd529762bdf675a4b6b355a8e6a2e92dced727f..66a637436b8da7592912d756d3a076e6bfefb3e1 100644
--- a/third_party/mojo/src/mojo/edk/test/test_utils_posix.cc
+++ b/mojo/edk/test/test_utils_posix.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "third_party/mojo/src/mojo/edk/test/test_utils.h"
+#include "mojo/edk/test/test_utils.h"
#include <fcntl.h>
#include <unistd.h>
@@ -10,9 +10,10 @@
#include "base/posix/eintr_wrapper.h"
namespace mojo {
+namespace edk {
namespace test {
-bool BlockingWrite(const embedder::PlatformHandle& handle,
+bool BlockingWrite(const PlatformHandle& handle,
const void* buffer,
size_t bytes_to_write,
size_t* bytes_written) {
@@ -33,7 +34,7 @@ bool BlockingWrite(const embedder::PlatformHandle& handle,
return true;
}
-bool BlockingRead(const embedder::PlatformHandle& handle,
+bool BlockingRead(const PlatformHandle& handle,
void* buffer,
size_t buffer_size,
size_t* bytes_read) {
@@ -54,7 +55,7 @@ bool BlockingRead(const embedder::PlatformHandle& handle,
return true;
}
-bool NonBlockingRead(const embedder::PlatformHandle& handle,
+bool NonBlockingRead(const PlatformHandle& handle,
void* buffer,
size_t buffer_size,
size_t* bytes_read) {
@@ -72,14 +73,14 @@ bool NonBlockingRead(const embedder::PlatformHandle& handle,
return true;
}
-embedder::ScopedPlatformHandle PlatformHandleFromFILE(base::ScopedFILE fp) {
+ScopedPlatformHandle PlatformHandleFromFILE(base::ScopedFILE fp) {
CHECK(fp);
int rv = dup(fileno(fp.get()));
PCHECK(rv != -1) << "dup";
- return embedder::ScopedPlatformHandle(embedder::PlatformHandle(rv));
+ return ScopedPlatformHandle(PlatformHandle(rv));
}
-base::ScopedFILE FILEFromPlatformHandle(embedder::ScopedPlatformHandle h,
+base::ScopedFILE FILEFromPlatformHandle(ScopedPlatformHandle h,
const char* mode) {
CHECK(h.is_valid());
base::ScopedFILE rv(fdopen(h.release().fd, mode));
@@ -88,4 +89,5 @@ base::ScopedFILE FILEFromPlatformHandle(embedder::ScopedPlatformHandle h,
}
} // namespace test
+} // namespace edk
} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698