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

Side by Side Diff: components/nacl/renderer/plugin/utility.cc

Issue 1640523002: PNaCl cleanup: Reuse base::File for closing a handle/FD (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 4 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 | « components/nacl/renderer/plugin/utility.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 * Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be 3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file. 4 * found in the LICENSE file.
5 */ 5 */
6 6
7 #include <stdarg.h> 7 #include <stdarg.h>
8 #include <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 10
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 static const PPB_NaCl_Private* g_nacl_interface = NULL; 66 static const PPB_NaCl_Private* g_nacl_interface = NULL;
67 67
68 const PPB_NaCl_Private* GetNaClInterface() { 68 const PPB_NaCl_Private* GetNaClInterface() {
69 return g_nacl_interface; 69 return g_nacl_interface;
70 } 70 }
71 71
72 void SetNaClInterface(const PPB_NaCl_Private* nacl_interface) { 72 void SetNaClInterface(const PPB_NaCl_Private* nacl_interface) {
73 g_nacl_interface = nacl_interface; 73 g_nacl_interface = nacl_interface;
74 } 74 }
75 75
76 void CloseFileHandle(PP_FileHandle file_handle) {
77 #if NACL_WINDOWS
78 CloseHandle(file_handle);
79 #else
80 close(file_handle);
81 #endif
82 }
83
84 } // namespace plugin 76 } // namespace plugin
OLDNEW
« no previous file with comments | « components/nacl/renderer/plugin/utility.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698