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

Side by Side Diff: ppapi/shared_impl/platform_file.cc

Issue 174213003: PPAPI: Use clang-format on ppapi/shared_impl (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: remove DEPS Created 6 years, 10 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 | « ppapi/shared_impl/media_stream_buffer_manager.cc ('k') | ppapi/shared_impl/ppapi_globals.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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "ppapi/shared_impl/platform_file.h" 5 #include "ppapi/shared_impl/platform_file.h"
6 6
7 namespace ppapi { 7 namespace ppapi {
8 8
9 // TODO(piman/brettw): Change trusted interface to return a PP_FileHandle, 9 // TODO(piman/brettw): Change trusted interface to return a PP_FileHandle,
10 // those casts are ugly. 10 // those casts are ugly.
11 base::PlatformFile IntToPlatformFile(int32_t handle) { 11 base::PlatformFile IntToPlatformFile(int32_t handle) {
12 #if defined(OS_WIN) 12 #if defined(OS_WIN)
13 return reinterpret_cast<HANDLE>(static_cast<intptr_t>(handle)); 13 return reinterpret_cast<HANDLE>(static_cast<intptr_t>(handle));
14 #elif defined(OS_POSIX) 14 #elif defined(OS_POSIX)
15 return handle; 15 return handle;
16 #else 16 #else
17 #error Not implemented. 17 #error Not implemented.
18 #endif 18 #endif
19 } 19 }
20 20
21 int32_t PlatformFileToInt(base::PlatformFile handle) { 21 int32_t PlatformFileToInt(base::PlatformFile handle) {
22 #if defined(OS_WIN) 22 #if defined(OS_WIN)
23 return static_cast<int32_t>(reinterpret_cast<intptr_t>(handle)); 23 return static_cast<int32_t>(reinterpret_cast<intptr_t>(handle));
24 #elif defined(OS_POSIX) 24 #elif defined(OS_POSIX)
25 return handle; 25 return handle;
26 #else 26 #else
27 #error Not implemented. 27 #error Not implemented.
28 #endif 28 #endif
29 } 29 }
30 30
31 } // namespace ppapi 31 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/shared_impl/media_stream_buffer_manager.cc ('k') | ppapi/shared_impl/ppapi_globals.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698