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

Unified Diff: services/native_support/redirectors.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
« no previous file with comments | « services/native_support/process_impl_unittest.cc ('k') | services/native_viewport/native_viewport_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/native_support/redirectors.cc
diff --git a/services/native_support/redirectors.cc b/services/native_support/redirectors.cc
index bce20fd298b82df9ec45ff322f19b08ad8b83139..4b9a59dafd2fa75d1f2d34092efe1d4d5751fd5b 100644
--- a/services/native_support/redirectors.cc
+++ b/services/native_support/redirectors.cc
@@ -80,14 +80,14 @@ void FDToMojoFileRedirector::DoWrite() {
mojo::Array<uint8_t> bytes_to_write(num_bytes_to_write);
memcpy(&bytes_to_write[offset_], buffer_.get(), num_bytes_to_write);
- file_->Write(bytes_to_write.Pass(), 0, mojo::files::WHENCE_FROM_CURRENT,
+ file_->Write(bytes_to_write.Pass(), 0, mojo::files::Whence::FROM_CURRENT,
base::Bind(&FDToMojoFileRedirector::DidWrite,
weak_factory_.GetWeakPtr()));
}
void FDToMojoFileRedirector::DidWrite(mojo::files::Error error,
uint32_t num_bytes_written) {
- if (error != mojo::files::ERROR_OK) {
+ if (error != mojo::files::Error::OK) {
LOG(WARNING) << "Failed to write to Mojo File";
// TODO(vtl): Should maybe close |file_|?
return;
@@ -131,7 +131,7 @@ void MojoFileToFDRedirector::Start() {
return;
file_->Read(
- static_cast<uint32_t>(buffer_size_), 0, mojo::files::WHENCE_FROM_CURRENT,
+ static_cast<uint32_t>(buffer_size_), 0, mojo::files::Whence::FROM_CURRENT,
base::Bind(&MojoFileToFDRedirector::DidRead, weak_factory_.GetWeakPtr()));
read_pending_ = true;
}
@@ -145,7 +145,7 @@ void MojoFileToFDRedirector::DidRead(mojo::files::Error error,
DCHECK(read_pending_);
read_pending_ = false;
- if (error != mojo::files::ERROR_OK) {
+ if (error != mojo::files::Error::OK) {
LOG(ERROR) << "Read failed";
// TODO(vtl): Should maybe close |file_|?
return;
« no previous file with comments | « services/native_support/process_impl_unittest.cc ('k') | services/native_viewport/native_viewport_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698