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

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

Issue 1388413005: Move //mojo/services/X/public/... to //mojo/services/X/... (part 1). (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/mojio_config.h » ('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
deleted file mode 100644
index ca06d8f37bc3d4704a250964e45ee4ae798f6786..0000000000000000000000000000000000000000
--- a/mojo/services/files/public/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 "files/public/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 | « mojo/services/files/public/c/lib/util.h ('k') | mojo/services/files/public/c/mojio_config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698