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

Unified Diff: services/files/c/lib/util.cc

Issue 1133933002: Move //services/files/c -> //mojo/services/files/public/c. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: remove data dep 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/files/c/lib/util.h ('k') | services/files/c/mojio_config.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/files/c/lib/util.cc
diff --git a/services/files/c/lib/util.cc b/services/files/c/lib/util.cc
deleted file mode 100644
index e5cbb0c04b71709b6f26733c7dd4c762f4839ba1..0000000000000000000000000000000000000000
--- a/services/files/c/lib/util.cc
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "services/files/c/lib/util.h"
-
-#include <assert.h>
-#include <errno.h>
-
-namespace mojio {
-
-int ErrorToErrno(mojo::files::Error error) {
- switch (error) {
- // TODO(vtl): Real errno encodings....
- case mojo::files::ERROR_OK:
- return 0;
- case mojo::files::ERROR_UNKNOWN:
- // TODO(vtl): Something better?
- return EIO;
- case mojo::files::ERROR_INVALID_ARGUMENT:
- return EINVAL;
- case mojo::files::ERROR_PERMISSION_DENIED:
- return EACCES;
- 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:
- // TODO(vtl): Sometimes ENOTSUP?
- return ENOSYS;
- case mojo::files::ERROR_CLOSED:
- return EBADF;
- case mojo::files::ERROR_UNAVAILABLE:
- // TODO(vtl): May sometimes be EAGAIN?
- return EACCES;
- case mojo::files::ERROR_INTERNAL:
- // TODO(vtl): Something better?
- return EIO;
- }
- assert(false);
- // TODO(vtl): Something better?
- return EIO;
-}
-
-} // namespace mojio
« no previous file with comments | « services/files/c/lib/util.h ('k') | services/files/c/mojio_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698