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

Unified Diff: third_party/grpc/test/cpp/util/subprocess.cc

Issue 1932353002: Initial checkin of gRPC to third_party/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « third_party/grpc/test/cpp/util/subprocess.h ('k') | third_party/grpc/test/cpp/util/test_config.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/grpc/test/cpp/util/subprocess.cc
diff --git a/third_party/WebKit/Source/core/svg/SVGAnimatedInteger.cpp b/third_party/grpc/test/cpp/util/subprocess.cc
similarity index 68%
copy from third_party/WebKit/Source/core/svg/SVGAnimatedInteger.cpp
copy to third_party/grpc/test/cpp/util/subprocess.cc
index b7c405d1aa11869c80b7c8a69a2cf9cd1047d82d..33f3820a2bbfff2c796829572386649f68170c7e 100644
--- a/third_party/WebKit/Source/core/svg/SVGAnimatedInteger.cpp
+++ b/third_party/grpc/test/cpp/util/subprocess.cc
@@ -1,5 +1,7 @@
/*
- * Copyright (C) 2014 Google Inc. All rights reserved.
+ *
+ * Copyright 2015-2016, Google Inc.
+ * All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -26,29 +28,32 @@
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
*/
-#include "core/svg/SVGAnimatedInteger.h"
+#include "test/cpp/util/subprocess.h"
-#include "core/svg/SVGAnimatedIntegerOptionalInteger.h"
-#include "core/svg/SVGElement.h"
+#include <vector>
-namespace blink {
+#include <grpc/support/subprocess.h>
-void SVGAnimatedInteger::synchronizeAttribute()
-{
- if (m_parentIntegerOptionalInteger) {
- m_parentIntegerOptionalInteger->synchronizeAttribute();
- return;
- }
+namespace grpc {
- SVGAnimatedProperty<SVGInteger>::synchronizeAttribute();
+static gpr_subprocess *MakeProcess(std::initializer_list<std::string> args) {
+ std::vector<const char *> vargs;
+ for (auto it = args.begin(); it != args.end(); ++it) {
+ vargs.push_back(it->c_str());
+ }
+ return gpr_subprocess_create(vargs.size(), &vargs[0]);
}
-DEFINE_TRACE(SVGAnimatedInteger)
-{
- visitor->trace(m_parentIntegerOptionalInteger);
- SVGAnimatedProperty<SVGInteger>::trace(visitor);
-}
+SubProcess::SubProcess(std::initializer_list<std::string> args)
+ : subprocess_(MakeProcess(args)) {}
+
+SubProcess::~SubProcess() { gpr_subprocess_destroy(subprocess_); }
+
+int SubProcess::Join() { return gpr_subprocess_join(subprocess_); }
+
+void SubProcess::Interrupt() { gpr_subprocess_interrupt(subprocess_); }
-} // namespace blink
+} // namespace grpc
« no previous file with comments | « third_party/grpc/test/cpp/util/subprocess.h ('k') | third_party/grpc/test/cpp/util/test_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698