 Chromium Code Reviews
 Chromium Code Reviews Issue 2411483002:
  Enable win32k lockdown for ppapi processes.  (Closed)
    
  
    Issue 2411483002:
  Enable win32k lockdown for ppapi processes.  (Closed) 
  | Index: chrome/browser/chrome_content_browser_client.cc | 
| diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc | 
| index 007f69b15ec609724447899f31792ce6e18090a8..6c26bec05e13249ace433c0bce1787724086a7fa 100644 | 
| --- a/chrome/browser/chrome_content_browser_client.cc | 
| +++ b/chrome/browser/chrome_content_browser_client.cc | 
| @@ -2887,57 +2887,6 @@ bool ChromeContentBrowserClient::PreSpawnRenderer( | 
| return false; | 
| return result == sandbox::SBOX_ALL_OK; | 
| } | 
| - | 
| -bool ChromeContentBrowserClient::IsWin32kLockdownEnabledForMimeType( | 
| - const std::string& mime_type) const { | 
| - // We don't support PPAPI win32k lockdown prior to Windows 10. | 
| - if (base::win::GetVersion() < base::win::VERSION_WIN10) | 
| - return false; | 
| - // First, check if any variation parameters have enabled or disabled this | 
| - // mime type either specifically or globally. | 
| - std::map<std::string, std::string> mime_params; | 
| - if (variations::GetVariationParams("EnableWin32kLockDownMimeTypes", | 
| 
Alexei Svitkine (slow)
2016/10/11 16:32:10
Can you check if some includes can be removed from
 
Will Harris
2016/10/11 17:17:26
variations::GetVariationParams is still used for b
 | 
| - &mime_params)) { | 
| - bool enabled = false; | 
| - for (const auto& param : mime_params) { | 
| - if (param.first == mime_type || param.first == "*") { | 
| - // Disabled entries take precedence over Enabled entries. | 
| - if (base::StartsWith(param.second, "Disabled", | 
| - base::CompareCase::INSENSITIVE_ASCII)) { | 
| - return false; | 
| - } | 
| - if (base::StartsWith(param.second, "Enabled", | 
| - base::CompareCase::INSENSITIVE_ASCII)) { | 
| - enabled = true; | 
| - } | 
| - } | 
| - } | 
| - return enabled; | 
| - } | 
| - | 
| - // Second, check the command line to see if this mime type is enabled | 
| - // either specifically or globally. | 
| - const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); | 
| - | 
| - if (!cmd_line->HasSwitch(switches::kEnableWin32kLockDownMimeTypes)) | 
| - return false; | 
| - | 
| - std::string mime_types = | 
| - cmd_line->GetSwitchValueASCII(switches::kEnableWin32kLockDownMimeTypes); | 
| - | 
| - // Consider the value * to enable all mime types for lockdown. | 
| - if (mime_types == "*") | 
| - return true; | 
| - | 
| - base::StringTokenizer tokenizer(mime_types, ","); | 
| - tokenizer.set_quote_chars("\""); | 
| - while (tokenizer.GetNext()) { | 
| - if (tokenizer.token() == mime_type) | 
| - return true; | 
| - } | 
| - | 
| - return false; | 
| -} | 
| #endif // defined(OS_WIN) | 
| void ChromeContentBrowserClient::ExposeInterfacesToRenderer( |