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

Side by Side Diff: services/files/c/lib/util.cc

Issue 1130873002: Enable //services/files/c:apptests on Android now that we have the C++11 library. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « services/files/c/BUILD.gn ('k') | services/files/c/mojio_sys_stat.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "services/files/c/lib/util.h" 5 #include "services/files/c/lib/util.h"
6 6
7 #include <assert.h>
7 #include <errno.h> 8 #include <errno.h>
8 9
9 namespace mojio { 10 namespace mojio {
10 11
11 int ErrorToErrno(mojo::files::Error error) { 12 int ErrorToErrno(mojo::files::Error error) {
12 switch (error) { 13 switch (error) {
13 // TODO(vtl): Real errno encodings.... 14 // TODO(vtl): Real errno encodings....
14 case mojo::files::ERROR_OK: 15 case mojo::files::ERROR_OK:
15 return 0; 16 return 0;
16 case mojo::files::ERROR_UNKNOWN: 17 case mojo::files::ERROR_UNKNOWN:
(...skipping 12 matching lines...) Expand all
29 return ENOSYS; 30 return ENOSYS;
30 case mojo::files::ERROR_CLOSED: 31 case mojo::files::ERROR_CLOSED:
31 return EBADF; 32 return EBADF;
32 case mojo::files::ERROR_UNAVAILABLE: 33 case mojo::files::ERROR_UNAVAILABLE:
33 // TODO(vtl): May sometimes be EAGAIN? 34 // TODO(vtl): May sometimes be EAGAIN?
34 return EACCES; 35 return EACCES;
35 case mojo::files::ERROR_INTERNAL: 36 case mojo::files::ERROR_INTERNAL:
36 // TODO(vtl): Something better? 37 // TODO(vtl): Something better?
37 return EIO; 38 return EIO;
38 } 39 }
40 assert(false);
41 // TODO(vtl): Something better?
42 return EIO;
39 } 43 }
40 44
41 } // namespace mojio 45 } // namespace mojio
OLDNEW
« no previous file with comments | « services/files/c/BUILD.gn ('k') | services/files/c/mojio_sys_stat.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698