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

Unified Diff: mojo/services/files/public/c/lib/util.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 | « mojo/services/files/public/c/lib/util.h ('k') | mojo/services/files/public/c/tests/mojio_impl_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/services/files/public/c/lib/util.cc
diff --git a/mojo/services/files/public/c/lib/util.cc b/mojo/services/files/public/c/lib/util.cc
index 13c24389e8adcd73e29f2ca04f10808a172bd0ef..ca06d8f37bc3d4704a250964e45ee4ae798f6786 100644
--- a/mojo/services/files/public/c/lib/util.cc
+++ b/mojo/services/files/public/c/lib/util.cc
@@ -12,28 +12,28 @@ namespace mojio {
int ErrorToErrno(mojo::files::Error error) {
switch (error) {
// TODO(vtl): Real errno encodings....
- case mojo::files::ERROR_OK:
+ case mojo::files::Error::OK:
return 0;
- case mojo::files::ERROR_UNKNOWN:
+ case mojo::files::Error::UNKNOWN:
// TODO(vtl): Something better?
return EIO;
- case mojo::files::ERROR_INVALID_ARGUMENT:
+ case mojo::files::Error::INVALID_ARGUMENT:
return EINVAL;
- case mojo::files::ERROR_PERMISSION_DENIED:
+ case mojo::files::Error::PERMISSION_DENIED:
return EACCES;
- case mojo::files::ERROR_OUT_OF_RANGE:
+ case mojo::files::Error::OUT_OF_RANGE:
// TODO(vtl): But sometimes it might be E2BIG or EDOM or ENAMETOOLONG,
// etc.?
return EINVAL;
- case mojo::files::ERROR_UNIMPLEMENTED:
+ case mojo::files::Error::UNIMPLEMENTED:
// TODO(vtl): Sometimes ENOTSUP?
return ENOSYS;
- case mojo::files::ERROR_CLOSED:
+ case mojo::files::Error::CLOSED:
return EBADF;
- case mojo::files::ERROR_UNAVAILABLE:
+ case mojo::files::Error::UNAVAILABLE:
// TODO(vtl): May sometimes be EAGAIN?
return EACCES;
- case mojo::files::ERROR_INTERNAL:
+ case mojo::files::Error::INTERNAL:
// TODO(vtl): Something better?
return EIO;
}
« no previous file with comments | « mojo/services/files/public/c/lib/util.h ('k') | mojo/services/files/public/c/tests/mojio_impl_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698