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

Side by Side Diff: mojo/services/files/c/lib/mojio_sys_stat.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 unified diff | Download patch
« no previous file with comments | « mojo/services/files/c/lib/mojio_fcntl.cc ('k') | mojo/services/files/c/lib/mojio_unistd.cc » ('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 "files/public/c/mojio_sys_stat.h" 5 #include "files/c/mojio_sys_stat.h"
6 6
7 #include "files/public/c/lib/fd_impl.h" 7 #include "files/c/lib/fd_impl.h"
8 #include "files/public/c/lib/fd_table.h" 8 #include "files/c/lib/fd_table.h"
9 #include "files/public/c/lib/singletons.h" 9 #include "files/c/lib/singletons.h"
10 10
11 namespace mojio { 11 namespace mojio {
12 namespace { 12 namespace {
13 13
14 int FstatImpl(int fd, struct mojio_stat* buf) { 14 int FstatImpl(int fd, struct mojio_stat* buf) {
15 FDImpl* fd_impl = singletons::GetFDTable()->Get(fd); 15 FDImpl* fd_impl = singletons::GetFDTable()->Get(fd);
16 if (!fd_impl) 16 if (!fd_impl)
17 return -1; 17 return -1;
18 18
19 return fd_impl->Fstat(buf) ? 0 : -1; 19 return fd_impl->Fstat(buf) ? 0 : -1;
20 } 20 }
21 21
22 } // namespace 22 } // namespace
23 } // namespace mojio 23 } // namespace mojio
24 24
25 extern "C" { 25 extern "C" {
26 26
27 int mojio_fstat(int fd, struct mojio_stat* buf) { 27 int mojio_fstat(int fd, struct mojio_stat* buf) {
28 return mojio::FstatImpl(fd, buf); 28 return mojio::FstatImpl(fd, buf);
29 } 29 }
30 30
31 } // extern "C" 31 } // extern "C"
OLDNEW
« no previous file with comments | « mojo/services/files/c/lib/mojio_fcntl.cc ('k') | mojo/services/files/c/lib/mojio_unistd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698