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

Side by Side Diff: sandbox/win/src/handle_closer.cc

Issue 1106203002: sandbox/win: Fix warnings found by clang chromium-style plugin on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « sandbox/win/src/handle_closer.h ('k') | sandbox/win/src/handle_table.h » ('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 "sandbox/win/src/handle_closer.h" 5 #include "sandbox/win/src/handle_closer.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/win/windows_version.h" 9 #include "base/win/windows_version.h"
10 #include "sandbox/win/src/interceptors.h" 10 #include "sandbox/win/src/interceptors.h"
(...skipping 14 matching lines...) Expand all
25 return reinterpret_cast<T*>(RoundUpToWordSize(reinterpret_cast<size_t>(v))); 25 return reinterpret_cast<T*>(RoundUpToWordSize(reinterpret_cast<size_t>(v)));
26 } 26 }
27 27
28 } // namespace 28 } // namespace
29 29
30 namespace sandbox { 30 namespace sandbox {
31 31
32 // Memory buffer mapped from the parent, with the list of handles. 32 // Memory buffer mapped from the parent, with the list of handles.
33 SANDBOX_INTERCEPT HandleCloserInfo* g_handles_to_close; 33 SANDBOX_INTERCEPT HandleCloserInfo* g_handles_to_close;
34 34
35 HandleCloser::HandleCloser() {} 35 HandleCloser::HandleCloser() {
36 }
37
38 HandleCloser::~HandleCloser() {
39 }
36 40
37 ResultCode HandleCloser::AddHandle(const base::char16* handle_type, 41 ResultCode HandleCloser::AddHandle(const base::char16* handle_type,
38 const base::char16* handle_name) { 42 const base::char16* handle_name) {
39 if (!handle_type) 43 if (!handle_type)
40 return SBOX_ERROR_BAD_PARAMS; 44 return SBOX_ERROR_BAD_PARAMS;
41 45
42 base::string16 resolved_name; 46 base::string16 resolved_name;
43 if (handle_name) { 47 if (handle_name) {
44 resolved_name = handle_name; 48 resolved_name = handle_name;
45 if (handle_type == base::string16(L"Key")) 49 if (handle_type == base::string16(L"Key"))
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 185
182 if (NT_SUCCESS(result) && name->Buffer && name->Length) 186 if (NT_SUCCESS(result) && name->Buffer && name->Length)
183 handle_name->assign(name->Buffer, name->Length / sizeof(wchar_t)); 187 handle_name->assign(name->Buffer, name->Length / sizeof(wchar_t));
184 else 188 else
185 handle_name->clear(); 189 handle_name->clear();
186 190
187 return NT_SUCCESS(result); 191 return NT_SUCCESS(result);
188 } 192 }
189 193
190 } // namespace sandbox 194 } // namespace sandbox
OLDNEW
« no previous file with comments | « sandbox/win/src/handle_closer.h ('k') | sandbox/win/src/handle_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698