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

Side by Side Diff: mojo/services/files/c/lib/file_fd_impl.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.h ('k') | mojo/services/files/c/lib/mojio_fcntl.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/lib/file_fd_impl.h" 5 #include "files/c/lib/file_fd_impl.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include <limits> 10 #include <limits>
11 11
12 #include "files/public/c/lib/errno_impl.h" 12 #include "files/c/lib/errno_impl.h"
13 #include "files/public/c/lib/template_util.h" 13 #include "files/c/lib/template_util.h"
14 #include "files/public/c/lib/util.h" 14 #include "files/c/lib/util.h"
15 #include "files/public/c/mojio_unistd.h" 15 #include "files/c/mojio_unistd.h"
16 #include "files/public/interfaces/types.mojom.h" 16 #include "files/interfaces/types.mojom.h"
17 #include "mojo/public/cpp/bindings/interface_request.h" 17 #include "mojo/public/cpp/bindings/interface_request.h"
18 #include "mojo/public/cpp/environment/logging.h" 18 #include "mojo/public/cpp/environment/logging.h"
19 19
20 namespace mojio { 20 namespace mojio {
21 21
22 FileFDImpl::FileFDImpl(ErrnoImpl* errno_impl, mojo::files::FilePtr file) 22 FileFDImpl::FileFDImpl(ErrnoImpl* errno_impl, mojo::files::FilePtr file)
23 : FDImpl(errno_impl), file_(file.Pass()) { 23 : FDImpl(errno_impl), file_(file.Pass()) {
24 MOJO_DCHECK(file_); 24 MOJO_DCHECK(file_);
25 } 25 }
26 26
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 // Make up a value based on size. (Note: Despite the above "block size", this 275 // Make up a value based on size. (Note: Despite the above "block size", this
276 // block count is for 512-byte blocks!) 276 // block count is for 512-byte blocks!)
277 if (file_info->size > 0) 277 if (file_info->size > 0)
278 buf->st_blocks = (static_cast<mojio_blkcnt_t>(file_info->size) + 511) / 512; 278 buf->st_blocks = (static_cast<mojio_blkcnt_t>(file_info->size) + 511) / 512;
279 // Else leave |st_blocks| zero. 279 // Else leave |st_blocks| zero.
280 280
281 return true; 281 return true;
282 } 282 }
283 283
284 } // namespace mojio 284 } // namespace mojio
OLDNEW
« no previous file with comments | « mojo/services/files/c/lib/file_fd_impl.h ('k') | mojo/services/files/c/lib/mojio_fcntl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698