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

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: 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') | sandbox/win/src/broker_services.cc » ('J')
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..9db2a3838622870611566dcb118e1e60421d9772 100644
--- a/content/common/sandbox_win.cc
+++ b/content/common/sandbox_win.cc
@@ -797,9 +797,11 @@ sandbox::ResultCode StartSandboxedProcess(
TRACE_EVENT_BEGIN0("startup", "StartProcessWithAccess::LAUNCHPROCESS");
PROCESS_INFORMATION temp_process_info = {};
- result = g_broker_services->SpawnTarget(
- cmd_line->GetProgram().value().c_str(),
- cmd_line->GetCommandLineString().c_str(), policy, &temp_process_info);
+ sandbox::ResultCode last_warning = sandbox::SBOX_ALL_OK;
+ result =
+ g_broker_services->SpawnTarget(cmd_line->GetProgram().value().c_str(),
+ cmd_line->GetCommandLineString().c_str(),
+ policy, &last_warning, &temp_process_info);
DWORD last_error = ::GetLastError();
Will Harris 2016/07/12 16:10:59 Seems anachronistic to pass the last_error by SetL
base::win::ScopedProcessInformation target(temp_process_info);
@@ -815,6 +817,12 @@ sandbox::ResultCode StartSandboxedProcess(
return result;
}
+ if (sandbox::SBOX_ALL_OK != last_warning) {
+ UMA_HISTOGRAM_SPARSE_SLOWLY("Process.Sandbox.Launch.WarningResultCode",
Will Harris 2016/07/12 16:10:59 it might be an idea to always log this first histo
+ 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') | sandbox/win/src/broker_services.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698