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

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 2103153003: Restrict PPAPI Win32k lockdown to Win10 and above. (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 unified diff | Download patch
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chrome_content_browser_client.h" 5 #include "chrome/browser/chrome_content_browser_client.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 2677 matching lines...) Expand 10 before | Expand all | Expand 10 after
2688 sandbox::TargetPolicy::SUBSYS_NAMED_PIPES, 2688 sandbox::TargetPolicy::SUBSYS_NAMED_PIPES,
2689 sandbox::TargetPolicy::NAMEDPIPES_ALLOW_ANY, 2689 sandbox::TargetPolicy::NAMEDPIPES_ALLOW_ANY,
2690 L"\\\\.\\pipe\\chrome.nacl.*"); 2690 L"\\\\.\\pipe\\chrome.nacl.*");
2691 if (result != sandbox::SBOX_ALL_OK) 2691 if (result != sandbox::SBOX_ALL_OK)
2692 return false; 2692 return false;
2693 return result == sandbox::SBOX_ALL_OK; 2693 return result == sandbox::SBOX_ALL_OK;
2694 } 2694 }
2695 2695
2696 bool ChromeContentBrowserClient::IsWin32kLockdownEnabledForMimeType( 2696 bool ChromeContentBrowserClient::IsWin32kLockdownEnabledForMimeType(
2697 const std::string& mime_type) const { 2697 const std::string& mime_type) const {
2698 // We don't support PPAPI win32k lockdown prior to Windows 10.
2699 if (base::win::GetVersion() < base::win::VERSION_WIN10)
2700 return false;
2698 // First, check if any variation parameters have enabled or disabled this 2701 // First, check if any variation parameters have enabled or disabled this
2699 // mime type either specifically or globally. 2702 // mime type either specifically or globally.
2700 std::map<std::string, std::string> mime_params; 2703 std::map<std::string, std::string> mime_params;
2701 if (variations::GetVariationParams("EnableWin32kLockDownMimeTypes", 2704 if (variations::GetVariationParams("EnableWin32kLockDownMimeTypes",
2702 &mime_params)) { 2705 &mime_params)) {
2703 bool enabled = false; 2706 bool enabled = false;
2704 for (const auto& param : mime_params) { 2707 for (const auto& param : mime_params) {
2705 if (param.first == mime_type || param.first == "*") { 2708 if (param.first == mime_type || param.first == "*") {
2706 // Disabled entries take precedence over Enabled entries. 2709 // Disabled entries take precedence over Enabled entries.
2707 if (base::StartsWith(param.second, "Disabled", 2710 if (base::StartsWith(param.second, "Disabled",
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
2984 if (channel <= kMaxDisableEncryptionChannel) { 2987 if (channel <= kMaxDisableEncryptionChannel) {
2985 static const char* const kWebRtcDevSwitchNames[] = { 2988 static const char* const kWebRtcDevSwitchNames[] = {
2986 switches::kDisableWebRtcEncryption, 2989 switches::kDisableWebRtcEncryption,
2987 }; 2990 };
2988 to_command_line->CopySwitchesFrom(from_command_line, 2991 to_command_line->CopySwitchesFrom(from_command_line,
2989 kWebRtcDevSwitchNames, 2992 kWebRtcDevSwitchNames,
2990 arraysize(kWebRtcDevSwitchNames)); 2993 arraysize(kWebRtcDevSwitchNames));
2991 } 2994 }
2992 } 2995 }
2993 #endif // defined(ENABLE_WEBRTC) 2996 #endif // defined(ENABLE_WEBRTC)
OLDNEW
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698