Index: content/common/sandbox_win.cc |
diff --git a/content/common/sandbox_win.cc b/content/common/sandbox_win.cc |
index b56b74a8f0f1736c71aa3b92c3be0953f39121a4..1005b69b434ae1617ca66b4f52294f584d215efd 100644 |
--- a/content/common/sandbox_win.cc |
+++ b/content/common/sandbox_win.cc |
@@ -349,13 +349,18 @@ bool AddPolicyForSandboxedProcess(sandbox::TargetPolicy* policy) { |
// Win8+ adds a device DeviceApi that we don't need. |
if (base::win::GetVersion() > base::win::VERSION_WIN7) |
- policy->AddKernelObjectToClose(L"File", L"\\Device\\DeviceApi"); |
+ result = policy->AddKernelObjectToClose(L"File", L"\\Device\\DeviceApi"); |
+ if (result != sandbox::SBOX_ALL_OK) |
+ return false; |
// Close the proxy settings on XP. |
if (base::win::GetVersion() <= base::win::VERSION_SERVER_2003) |
- policy->AddKernelObjectToClose(L"Key", |
- L"HKCU\\Software\\Microsoft\\Windows\\" \ |
- L"CurrentVersion\\Internet Settings"); |
+ result = policy->AddKernelObjectToClose(L"Key", |
+ L"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\" \ |
+ L"CurrentVersion\\Internet Settings"); |
+ if (result != sandbox::SBOX_ALL_OK) |
+ return false; |
+ |
sandbox::TokenLevel initial_token = sandbox::USER_UNPROTECTED; |
if (base::win::GetVersion() > base::win::VERSION_XP) { |