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

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 588 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 bool is_nacl_allowed = 608 bool is_nacl_allowed =
609 is_extension_from_webstore || 609 #if !defined(__arm__)
610 is_extension_unrestricted || 610 // The ARM ABI is not quite stable, so only allow NaCl for
611 is_whitelisted_url || 611 // unrestricted extensions (i.e. built-in and under development).
612 is_nacl_unrestricted; 612 // TODO(dschuff): remove this when the ABI is stable
613 is_extension_from_webstore ||
614 is_whitelisted_url ||
615 #endif
616 is_extension_unrestricted ||
617 is_nacl_unrestricted;
613 if (is_nacl_allowed) { 618 if (is_nacl_allowed) {
614 bool app_can_use_dev_interfaces = 619 bool app_can_use_dev_interfaces =
615 // NaCl PDF viewer extension 620 // NaCl PDF viewer extension
616 (is_extension_from_webstore && 621 (is_extension_from_webstore &&
617 manifest_url.SchemeIs("chrome-extension") && 622 manifest_url.SchemeIs("chrome-extension") &&
618 manifest_url.host() == "acadkphlmlegjaadjagenfimbpphcgnh"); 623 manifest_url.host() == "acadkphlmlegjaadjagenfimbpphcgnh");
619 // Make sure that PPAPI 'dev' interfaces aren't available for production 624 // Make sure that PPAPI 'dev' interfaces aren't available for production
620 // apps unless they're whitelisted. 625 // apps unless they're whitelisted.
621 WebString dev_attribute = WebString::fromUTF8("@dev"); 626 WebString dev_attribute = WebString::fromUTF8("@dev");
622 if ((!is_whitelisted_url && !is_extension_from_webstore) || 627 if ((!is_whitelisted_url && !is_extension_from_webstore) ||
(...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() { 957 bool ChromeContentRendererClient::IsOtherExtensionWithWebRequestInstalled() {
953 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled(); 958 return extension_dispatcher_->IsOtherExtensionWithWebRequestInstalled();
954 } 959 }
955 960
956 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories( 961 void ChromeContentRendererClient::RegisterPPAPIInterfaceFactories(
957 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) { 962 webkit::ppapi::PpapiInterfaceFactoryManager* factory_manager) {
958 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory); 963 factory_manager->RegisterFactory(ChromePPAPIInterfaceFactory);
959 } 964 }
960 965
961 } // namespace chrome 966 } // 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