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

Unified Diff: testing/android/native_test_util.cc

Issue 16599008: Move CreateFIFO() and RedirectStream() from testing/android/ to base/android/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 6 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
« no previous file with comments | « testing/android/native_test_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/android/native_test_util.cc
diff --git a/testing/android/native_test_util.cc b/testing/android/native_test_util.cc
index 084908beac363a5a10996f2819c955f902e488ba..c0ea7b0fef82d66ce3381401c4aa0d6981975df5 100644
--- a/testing/android/native_test_util.cc
+++ b/testing/android/native_test_util.cc
@@ -4,14 +4,6 @@
#include "testing/android/native_test_util.h"
-#include <android/log.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include "base/command_line.h"
#include "base/file_util.h"
#include "base/files/file_path.h"
#include "base/strings/string_tokenizer.h"
@@ -19,15 +11,6 @@
namespace {
-const char kLogTag[] = "chromium";
-
-void AndroidLogError(const char* format, ...) {
- va_list args;
- va_start(args, format);
- __android_log_vprint(ANDROID_LOG_ERROR, kLogTag, format, args);
- va_end(args);
-}
-
void ParseArgsFromString(const std::string& command_line,
std::vector<std::string>* args) {
base::StringTokenizer tokenizer(command_line, kWhitespaceASCII);
@@ -44,25 +27,6 @@ void ParseArgsFromString(const std::string& command_line,
namespace testing {
namespace native_test_util {
-void CreateFIFO(const char* fifo_path) {
- unlink(fifo_path);
- // Default permissions for mkfifo is ignored, chmod is required.
- if (mkfifo(fifo_path, 0666) || chmod(fifo_path, 0666)) {
- AndroidLogError("Failed to create fifo %s: %s\n",
- fifo_path, strerror(errno));
- exit(EXIT_FAILURE);
- }
-}
-
-void RedirectStream(
- FILE* stream, const char* path, const char* mode) {
- if (!freopen(path, mode, stream)) {
- AndroidLogError("Failed to redirect stream to file: %s: %s\n",
- path, strerror(errno));
- exit(EXIT_FAILURE);
- }
-}
-
void ParseArgsFromCommandLineFile(
const char* path, std::vector<std::string>* args) {
base::FilePath command_line(path);
« no previous file with comments | « testing/android/native_test_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698