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

Side by Side Diff: mojo/services/files/c/lib/mojio_fcntl.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/file_fd_impl.cc ('k') | mojo/services/files/c/lib/mojio_sys_stat.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_fcntl.h" 5 #include "files/c/mojio_fcntl.h"
6 6
7 #include <stdarg.h> 7 #include <stdarg.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
11 11
12 #include "files/public/c/lib/directory_wrapper.h" 12 #include "files/c/lib/directory_wrapper.h"
13 #include "files/public/c/lib/fd_impl.h" 13 #include "files/c/lib/fd_impl.h"
14 #include "files/public/c/lib/fd_table.h" 14 #include "files/c/lib/fd_table.h"
15 #include "files/public/c/lib/singletons.h" 15 #include "files/c/lib/singletons.h"
16 16
17 namespace mojio { 17 namespace mojio {
18 namespace { 18 namespace {
19 19
20 int OpenImpl(const char* path, int oflag, mojio_mode_t mode) { 20 int OpenImpl(const char* path, int oflag, mojio_mode_t mode) {
21 DirectoryWrapper* cwd = singletons::GetCurrentWorkingDirectory(); 21 DirectoryWrapper* cwd = singletons::GetCurrentWorkingDirectory();
22 if (!cwd) 22 if (!cwd)
23 return -1; 23 return -1;
24 24
25 std::unique_ptr<FDImpl> fd_impl(cwd->Open(path, oflag, mode)); 25 std::unique_ptr<FDImpl> fd_impl(cwd->Open(path, oflag, mode));
(...skipping 19 matching lines...) Expand all
45 mojio_mode_t mode = 0; 45 mojio_mode_t mode = 0;
46 if ((oflag & MOJIO_O_CREAT)) { 46 if ((oflag & MOJIO_O_CREAT)) {
47 va_start(ap, oflag); 47 va_start(ap, oflag);
48 mode = va_arg(ap, mojio_mode_t); 48 mode = va_arg(ap, mojio_mode_t);
49 va_end(ap); 49 va_end(ap);
50 } 50 }
51 return mojio::OpenImpl(path, oflag, mode); 51 return mojio::OpenImpl(path, oflag, mode);
52 } 52 }
53 53
54 } // extern "C" 54 } // extern "C"
OLDNEW
« no previous file with comments | « mojo/services/files/c/lib/file_fd_impl.cc ('k') | mojo/services/files/c/lib/mojio_sys_stat.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698