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

Unified Diff: test/win/win_child_process.cc

Issue 1405093013: win: Lower integrity level of connection pipe (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: fixes Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | util/util.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/win/win_child_process.cc
diff --git a/test/win/win_child_process.cc b/test/win/win_child_process.cc
index 7d179337277ecbf06cde175145fe66ff942d1674..b6cbbbd2d3d23d5ab6e0b9e5044eec6fcb7d1045 100644
--- a/test/win/win_child_process.cc
+++ b/test/win/win_child_process.cc
@@ -26,6 +26,7 @@
#include "util/stdlib/string_number_conversion.h"
#include "util/string/split_string.h"
#include "util/win/handle.h"
+#include "util/win/scoped_local_alloc.h"
#include "test/paths.h"
namespace crashpad {
@@ -34,20 +35,11 @@ namespace test {
namespace {
const char kIsMultiprocessChild[] = "--is-multiprocess-child";
-struct LocalFreeTraits {
- static HLOCAL InvalidValue() { return nullptr; }
- static void Free(HLOCAL mem) {
- if (LocalFree(mem) != nullptr)
- PLOG(ERROR) << "LocalFree";
- }
-};
-
-using ScopedLocalFree = base::ScopedGeneric<HLOCAL, LocalFreeTraits>;
bool GetSwitch(const char* switch_name, std::string* value) {
int num_args;
wchar_t** args = CommandLineToArgvW(GetCommandLine(), &num_args);
- ScopedLocalFree scoped_args(args); // Take ownership.
+ ScopedLocalAlloc scoped_args(args); // Take ownership.
if (!args) {
PLOG(FATAL) << "CommandLineToArgvW";
return false;
« no previous file with comments | « no previous file | util/util.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698