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

Unified Diff: content/common/sandbox_win.cc

Issue 2130753002: Made setting lowbox token a warning. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverted change to logging Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | sandbox/win/sandbox_poc/main_ui_window.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/sandbox_win.cc
diff --git a/content/common/sandbox_win.cc b/content/common/sandbox_win.cc
index 35c33d597cc2a730df0c55f89cfa67fb6ea27f5f..baa2470971d11a792fc27fe66f66187842ac83ce 100644
--- a/content/common/sandbox_win.cc
+++ b/content/common/sandbox_win.cc
@@ -797,10 +797,13 @@ sandbox::ResultCode StartSandboxedProcess(
TRACE_EVENT_BEGIN0("startup", "StartProcessWithAccess::LAUNCHPROCESS");
PROCESS_INFORMATION temp_process_info = {};
+ sandbox::ResultCode last_warning = sandbox::SBOX_ALL_OK;
+ DWORD last_error = ERROR_SUCCESS;
result = g_broker_services->SpawnTarget(
cmd_line->GetProgram().value().c_str(),
- cmd_line->GetCommandLineString().c_str(), policy, &temp_process_info);
- DWORD last_error = ::GetLastError();
+ cmd_line->GetCommandLineString().c_str(), policy, &last_warning,
+ &last_error, &temp_process_info);
+
base::win::ScopedProcessInformation target(temp_process_info);
TRACE_EVENT_END0("startup", "StartProcessWithAccess::LAUNCHPROCESS");
@@ -815,6 +818,12 @@ sandbox::ResultCode StartSandboxedProcess(
return result;
}
+ if (sandbox::SBOX_ALL_OK != last_warning) {
+ UMA_HISTOGRAM_SPARSE_SLOWLY("Process.Sandbox.Launch.WarningResultCode",
+ last_warning);
+ UMA_HISTOGRAM_SPARSE_SLOWLY("Process.Sandbox.Launch.Warning", last_error);
+ }
+
delegate->PostSpawnTarget(target.process_handle());
CHECK(ResumeThread(target.thread_handle()) != static_cast<DWORD>(-1));
« no previous file with comments | « no previous file | sandbox/win/sandbox_poc/main_ui_window.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698