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

Unified Diff: examples/echo_terminal/main.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 | « examples/browser/browser.cc ('k') | examples/embedded_app/embedded_app.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/echo_terminal/main.cc
diff --git a/examples/echo_terminal/main.cc b/examples/echo_terminal/main.cc
index a199a5c05d83ef175e287390f084e652ec714892..0d4e595c59d18a1b03671b7700ba299ee2e2d0c1 100644
--- a/examples/echo_terminal/main.cc
+++ b/examples/echo_terminal/main.cc
@@ -29,7 +29,7 @@ class TerminalEchoer {
void StartReading() {
// TODO(vtl): Are |offset| and |whence| correct?
terminal_->Read(
- kMaxBytesToRead, 0, mojo::files::WHENCE_FROM_CURRENT,
+ kMaxBytesToRead, 0, mojo::files::Whence::FROM_CURRENT,
base::Bind(&TerminalEchoer::OnRead, base::Unretained(this)));
}
@@ -41,7 +41,7 @@ class TerminalEchoer {
// |Read()| callback:
void OnRead(mojo::files::Error error, mojo::Array<uint8_t> bytes_read) {
- if (error != mojo::files::ERROR_OK) {
+ if (error != mojo::files::Error::OK) {
LOG(ERROR) << "Error: Read(): " << error;
delete this;
return;
@@ -65,13 +65,13 @@ class TerminalEchoer {
// TODO(vtl): Are |offset| and |whence| correct?
terminal_->Write(
- bytes_read.Pass(), 0, mojo::files::WHENCE_FROM_CURRENT,
+ bytes_read.Pass(), 0, mojo::files::Whence::FROM_CURRENT,
base::Bind(&TerminalEchoer::OnWrite, base::Unretained(this)));
}
// |Write()| callback:
void OnWrite(mojo::files::Error error, uint32_t num_bytes_written) {
- if (error != mojo::files::ERROR_OK) {
+ if (error != mojo::files::Error::OK) {
LOG(ERROR) << "Error: Write(): " << error;
delete this;
return;
« no previous file with comments | « examples/browser/browser.cc ('k') | examples/embedded_app/embedded_app.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698