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

Side by Side Diff: chrome/renderer/chrome_content_renderer_client.cc

Issue 10898034: Disallow NaCl in chrome webstore for ARM (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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/renderer/chrome_content_renderer_client.h" 5 #include "chrome/renderer/chrome_content_renderer_client.h"
6 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 // code when PNaCl ships. 598 // code when PNaCl ships.
599 bool is_whitelisted_url = 599 bool is_whitelisted_url =
600 ((top_url.SchemeIs("http") || top_url.SchemeIs("https")) && 600 ((top_url.SchemeIs("http") || top_url.SchemeIs("https")) &&
601 (top_url.host() == "plus.google.com" || 601 (top_url.host() == "plus.google.com" ||
602 top_url.host() == "plus.sandbox.google.com") && 602 top_url.host() == "plus.sandbox.google.com") &&
603 top_url.path().find("/games") == 0); 603 top_url.path().find("/games") == 0);
604 604
605 // Allow Chrome Web Store extensions, built-in extensions, extensions 605 // Allow Chrome Web Store extensions, built-in extensions, extensions
606 // under development, invocations from whitelisted URLs, and all invocations 606 // under development, invocations from whitelisted URLs, and all invocations
607 // if --enable-nacl is set. 607 // if --enable-nacl is set.
608 #ifdef __arm__
jvoung (off chromium) 2012/08/29 16:49:33 nit: not sure if the if-defs are usually ARCH_CPU_
Derek Schuff 2012/08/29 17:00:25 Yeah, I wasn't sure either. I found both sprinkled
609 // Since the ARM ABI is not quite stable, do not allow webstore extensions
610 // to use it yet. TODO(dschuff): remove this when the ABI is stable
611 bool is_nacl_allowed = is_extension_unrestricted || is_nacl_unrestricted;
jvoung (off chromium) 2012/08/29 16:49:33 Just to confirm, some of the apps we are intereste
Derek Schuff 2012/08/29 17:00:25 Right. If you look directly above the only whiteli
612 #else
608 bool is_nacl_allowed = 613 bool is_nacl_allowed =
609 is_extension_from_webstore || 614 is_extension_from_webstore ||
610 is_extension_unrestricted || 615 is_extension_unrestricted ||
611 is_whitelisted_url || 616 is_whitelisted_url ||
612 is_nacl_unrestricted; 617 is_nacl_unrestricted;
618 #endif
613 if (is_nacl_allowed) { 619 if (is_nacl_allowed) {
614 bool app_can_use_dev_interfaces = 620 bool app_can_use_dev_interfaces =
615 // NaCl PDF viewer extension 621 // NaCl PDF viewer extension
616 (is_extension_from_webstore && 622 (is_extension_from_webstore &&
617 manifest_url.SchemeIs("chrome-extension") && 623 manifest_url.SchemeIs("chrome-extension") &&
618 manifest_url.host() == "acadkphlmlegjaadjagenfimbpphcgnh"); 624 manifest_url.host() == "acadkphlmlegjaadjagenfimbpphcgnh");
619 // Make sure that PPAPI 'dev' interfaces aren't available for production 625 // Make sure that PPAPI 'dev' interfaces aren't available for production
620 // apps unless they're whitelisted. 626 // apps unless they're whitelisted.
621 WebString dev_attribute = WebString::fromUTF8("@dev"); 627 WebString dev_attribute = WebString::fromUTF8("@dev");
622 if ((!is_whitelisted_url && !is_extension_from_webstore) || 628 if ((!is_whitelisted_url && !is_extension_from_webstore) ||
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { 958 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() {
953 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); 959 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled();
954 } 960 }
955 961
956 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( 962 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories(
957 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { 963 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) {
958 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); 964 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory);
959 } 965 }
960 966
961 } // namespace chrome 967 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698