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

Unified Diff: services/native_support/process_impl.cc

Issue 1375313006: For c++, Generate enum classes instead of enum from mojom. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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: services/native_support/process_impl.cc
diff --git a/services/native_support/process_impl.cc b/services/native_support/process_impl.cc
index 2fc77ffdc79a95571e2bd66f2cee3305308800c1..c268a7edba0786ace837cb6e2f2aaa49decc7118 100644
--- a/services/native_support/process_impl.cc
+++ b/services/native_support/process_impl.cc
@@ -132,7 +132,7 @@ void ProcessImpl::SpawnWithTerminal(
int errno_value = 0;
if (!MakePtyPair(&master_fd, &slave_fd, &errno_value)) {
// TODO(vtl): Well, this is dumb (we should use errno_value).
- callback.Run(mojo::files::ERROR_UNKNOWN);
+ callback.Run(mojo::files::Error::UNKNOWN);
return;
}
@@ -174,7 +174,7 @@ void ProcessImpl::SpawnImpl(
} else {
if (!argv.size() ||
argv.size() > static_cast<size_t>(std::numeric_limits<int>::max())) {
- callback.Run(mojo::files::ERROR_INVALID_ARGUMENT);
+ callback.Run(mojo::files::Error::INVALID_ARGUMENT);
return;
}
// TODO(vtl): Currently, we don't support setting argv[0], due to
@@ -227,13 +227,13 @@ void ProcessImpl::SpawnImpl(
// doesn't exist (since fork succeeds; it's the exec that fails).
if (!process.IsValid()) {
// TODO(vtl): Well, this is dumb (can we check errno?).
- callback.Run(mojo::files::ERROR_UNKNOWN);
+ callback.Run(mojo::files::Error::UNKNOWN);
return;
}
new ProcessControllerImpl(worker_runner_, process_controller.Pass(),
process.Pass(), std::move(process_io_redirection));
- callback.Run(mojo::files::ERROR_OK);
+ callback.Run(mojo::files::Error::OK);
}
} // namespace native_support
« no previous file with comments | « services/native_support/process_controller_impl_unittest.cc ('k') | services/native_support/process_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698