Flag and whitelist to allow crxfs api in NaCl

This is pretty much the same as existing Pepper Socket API.  Since the
original code for socket is in chrome_content_browser_client.h for
crossing chrome-content boundary, it's moved to the new file
pepper_util.cc, so that PepperCrxFileSystemMessageFilter can access
directory inside chrome space.

BUG=240865

Review URL: https://chromiumcodereview.appspot.com/15521002

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@202951 0039d316-1c4b-4281-b951-d872f2087c98
parent 081b5440
...@@ -13,9 +13,7 @@ ...@@ -13,9 +13,7 @@
#include "base/lazy_instance.h" #include "base/lazy_instance.h"
#include "base/path_service.h" #include "base/path_service.h"
#include "base/prefs/pref_service.h" #include "base/prefs/pref_service.h"
#include "base/sha1.h"
#include "base/string_number_conversions.h" #include "base/string_number_conversions.h"
#include "base/strings/string_tokenizer.h"
#include "base/utf_string_conversions.h" #include "base/utf_string_conversions.h"
#include "chrome/app/breakpad_mac.h" #include "chrome/app/breakpad_mac.h"
#include "chrome/browser/app_mode/app_mode_utils.h" #include "chrome/browser/app_mode/app_mode_utils.h"
...@@ -51,6 +49,7 @@ ...@@ -51,6 +49,7 @@
#include "chrome/browser/net/chrome_net_log.h" #include "chrome/browser/net/chrome_net_log.h"
#include "chrome/browser/notifications/desktop_notification_service.h" #include "chrome/browser/notifications/desktop_notification_service.h"
#include "chrome/browser/notifications/desktop_notification_service_factory.h" #include "chrome/browser/notifications/desktop_notification_service_factory.h"
#include "chrome/browser/pepper_permission_util.h"
#include "chrome/browser/platform_util.h" #include "chrome/browser/platform_util.h"
#include "chrome/browser/plugins/plugin_info_message_filter.h" #include "chrome/browser/plugins/plugin_info_message_filter.h"
#include "chrome/browser/prefs/scoped_user_pref_update.h" #include "chrome/browser/prefs/scoped_user_pref_update.h"
...@@ -203,6 +202,7 @@ namespace { ...@@ -203,6 +202,7 @@ namespace {
// thread. // thread.
base::LazyInstance<std::string> g_io_thread_application_locale; base::LazyInstance<std::string> g_io_thread_application_locale;
#if defined(ENABLE_PLUGINS)
const char* kPredefinedAllowedSocketOrigins[] = { const char* kPredefinedAllowedSocketOrigins[] = {
"okddffdblfhhnmhodogpojmfkjmhinfp", // Test SSH Client "okddffdblfhhnmhodogpojmfkjmhinfp", // Test SSH Client
"pnhechapfaindjhompbnflcldabbghjo", // HTerm App (SSH Client) "pnhechapfaindjhompbnflcldabbghjo", // HTerm App (SSH Client)
...@@ -225,6 +225,7 @@ const char* kPredefinedAllowedSocketOrigins[] = { ...@@ -225,6 +225,7 @@ const char* kPredefinedAllowedSocketOrigins[] = {
"0B549507088E1564D672F7942EB87CA4DAD73972", // see crbug.com/238084 "0B549507088E1564D672F7942EB87CA4DAD73972", // see crbug.com/238084
"864288364E239573E777D3E0E36864E590E95C74" // see crbug.com/238084 "864288364E239573E777D3E0E36864E590E95C74" // see crbug.com/238084
}; };
#endif
// Returns a copy of the given url with its host set to given host and path set // Returns a copy of the given url with its host set to given host and path set
// to given path. Other parts of the url will be the same. // to given path. Other parts of the url will be the same.
...@@ -464,23 +465,15 @@ void SetApplicationLocaleOnIOThread(const std::string& locale) { ...@@ -464,23 +465,15 @@ void SetApplicationLocaleOnIOThread(const std::string& locale) {
g_io_thread_application_locale.Get() = locale; g_io_thread_application_locale.Get() = locale;
} }
std::string HashHost(const std::string& host) {
const std::string id_hash = base::SHA1HashString(host);
DCHECK(id_hash.length() == base::kSHA1Length);
return base::HexEncode(id_hash.c_str(), id_hash.length());
}
bool HostIsInSet(const std::string& host, const std::set<std::string>& set) {
return set.count(host) > 0 || set.count(HashHost(host)) > 0;
}
} // namespace } // namespace
namespace chrome { namespace chrome {
ChromeContentBrowserClient::ChromeContentBrowserClient() { ChromeContentBrowserClient::ChromeContentBrowserClient() {
#if defined(ENABLE_PLUGINS)
for (size_t i = 0; i < arraysize(kPredefinedAllowedSocketOrigins); ++i) for (size_t i = 0; i < arraysize(kPredefinedAllowedSocketOrigins); ++i)
allowed_socket_origins_.insert(kPredefinedAllowedSocketOrigins[i]); allowed_socket_origins_.insert(kPredefinedAllowedSocketOrigins[i]);
#endif
permissions_policy_delegate_.reset( permissions_policy_delegate_.reset(
new extensions::BrowserPermissionsPolicyDelegate()); new extensions::BrowserPermissionsPolicyDelegate());
...@@ -2143,60 +2136,15 @@ bool ChromeContentBrowserClient::AllowPepperSocketAPI( ...@@ -2143,60 +2136,15 @@ bool ChromeContentBrowserClient::AllowPepperSocketAPI(
content::BrowserContext* browser_context, content::BrowserContext* browser_context,
const GURL& url, const GURL& url,
const content::SocketPermissionRequest& params) { const content::SocketPermissionRequest& params) {
if (!url.is_valid()) #if defined(ENABLE_PLUGINS)
return false; return IsExtensionOrSharedModuleWhitelisted(
Profile::FromBrowserContext(browser_context),
std::string host = url.host(); url,
if (url.SchemeIs(extensions::kExtensionScheme) && allowed_socket_origins_,
HostIsInSet(host, allowed_socket_origins_)) { switches::kAllowNaClSocketAPI);
return true; #else
}
Profile* profile = Profile::FromBrowserContext(browser_context);
const Extension* extension = NULL;
ExtensionService* extension_service = !profile ? NULL :
extensions::ExtensionSystem::Get(profile)->extension_service();
if (extension_service) {
extension = extension_service->extensions()->
GetExtensionOrAppByURL(ExtensionURLInfo(url));
}
// Check the modules that are imported by this extension to see if any of them
// is whitelisted.
if (extension) {
const std::vector<extensions::SharedModuleInfo::ImportInfo>& imports =
extensions::SharedModuleInfo::GetImports(extension);
std::vector<extensions::SharedModuleInfo::ImportInfo>::const_iterator it;
for (it = imports.begin(); it != imports.end(); ++it) {
const Extension* imported_extension = extension_service->
GetExtensionById(it->extension_id, false);
if (imported_extension &&
extensions::SharedModuleInfo::IsSharedModule(imported_extension) &&
HostIsInSet(it->extension_id, allowed_socket_origins_)) {
return true;
}
}
}
// Need to check this now and not on construction because otherwise it won't
// work with browser_tests.
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
std::string allowed_list =
command_line.GetSwitchValueASCII(switches::kAllowNaClSocketAPI);
if (allowed_list == "*") {
// The wildcard allows socket API only for packaged and platform apps.
return extension &&
(extension->GetType() == Manifest::TYPE_LEGACY_PACKAGED_APP ||
extension->GetType() == Manifest::TYPE_PLATFORM_APP);
} else if (!allowed_list.empty()) {
base::StringTokenizer t(allowed_list, ",");
while (t.GetNext()) {
if (t.token() == host)
return true;
}
}
return false; return false;
#endif
} }
base::FilePath ChromeContentBrowserClient::GetHyphenDictionaryDirectory() { base::FilePath ChromeContentBrowserClient::GetHyphenDictionaryDirectory() {
......
...@@ -22,7 +22,6 @@ class QuotaPermissionContext; ...@@ -22,7 +22,6 @@ class QuotaPermissionContext;
} }
namespace extensions { namespace extensions {
class Extension;
class BrowserPermissionsPolicyDelegate; class BrowserPermissionsPolicyDelegate;
} }
...@@ -257,8 +256,10 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { ...@@ -257,8 +256,10 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
#endif #endif
private: private:
#if defined(ENABLE_PLUGINS)
// Set of origins that can use TCP/UDP private APIs from NaCl. // Set of origins that can use TCP/UDP private APIs from NaCl.
std::set<std::string> allowed_socket_origins_; std::set<std::string> allowed_socket_origins_;
#endif
scoped_ptr<extensions::BrowserPermissionsPolicyDelegate> scoped_ptr<extensions::BrowserPermissionsPolicyDelegate>
permissions_policy_delegate_; permissions_policy_delegate_;
......
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/pepper_permission_util.h"
#include <vector>
#include "base/command_line.h"
#include "base/sha1.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_tokenizer.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/google/google_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_set.h"
#include "chrome/common/extensions/manifest_handlers/shared_module_info.h"
#include "extensions/common/constants.h"
using extensions::Extension;
using extensions::Manifest;
namespace chrome {
namespace {
std::string HashHost(const std::string& host) {
const std::string id_hash = base::SHA1HashString(host);
DCHECK_EQ(id_hash.length(), base::kSHA1Length);
return base::HexEncode(id_hash.c_str(), id_hash.length());
}
bool HostIsInSet(const std::string& host, const std::set<std::string>& set) {
return set.count(host) > 0 || set.count(HashHost(host)) > 0;
}
} // namespace
bool IsExtensionOrSharedModuleWhitelisted(
Profile* profile,
const GURL& url,
const std::set<std::string>& whitelist,
const char* command_line_switch) {
if (!url.is_valid())
return false;
const std::string host = url.host();
if (url.SchemeIs(extensions::kExtensionScheme) &&
HostIsInSet(host, whitelist)) {
return true;
}
const Extension* extension = NULL;
ExtensionService* extension_service = !profile ? NULL :
extensions::ExtensionSystem::Get(profile)->extension_service();
if (extension_service) {
extension = extension_service->extensions()->
GetExtensionOrAppByURL(ExtensionURLInfo(url));
}
// Check the modules that are imported by this extension to see if any of them
// is whitelisted.
if (extension) {
typedef std::vector<extensions::SharedModuleInfo::ImportInfo>
ImportInfoVector;
const ImportInfoVector& imports =
extensions::SharedModuleInfo::GetImports(extension);
for (ImportInfoVector::const_iterator it = imports.begin();
it != imports.end(); ++it) {
const Extension* imported_extension = extension_service->
GetExtensionById(it->extension_id, false);
if (imported_extension &&
extensions::SharedModuleInfo::IsSharedModule(imported_extension) &&
HostIsInSet(it->extension_id, whitelist)) {
return true;
}
}
}
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
const std::string allowed_list =
command_line.GetSwitchValueASCII(command_line_switch);
if (allowed_list == "*") {
// The wildcard allows socket API only for packaged and platform apps.
return extension &&
(extension->GetType() == Manifest::TYPE_LEGACY_PACKAGED_APP ||
extension->GetType() == Manifest::TYPE_PLATFORM_APP);
}
if (!allowed_list.empty()) {
base::StringTokenizer t(allowed_list, ",");
while (t.GetNext()) {
if (t.token() == host)
return true;
}
}
return false;
}
} // namespace chrome
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_PEPPER_PERMISSION_UTIL_H_
#define CHROME_BROWSER_PEPPER_PERMISSION_UTIL_H_
#include <set>
#include <string>
class GURL;
class Profile;
namespace chrome {
// Returns true if the extension or it's shared module is whitelisted, or
// appears in command_line_switch.
bool IsExtensionOrSharedModuleWhitelisted(
Profile* profile,
const GURL& url,
const std::set<std::string>& whitelist,
const char* command_line_switch);
} // namespace chrome
#endif // CHROME_BROWSER_PEPPER_PERMISSION_UTIL_H_
...@@ -70,14 +70,6 @@ scoped_ptr<ResourceHost> ChromeBrowserPepperHostFactory::CreateResourceHost( ...@@ -70,14 +70,6 @@ scoped_ptr<ResourceHost> ChromeBrowserPepperHostFactory::CreateResourceHost(
host_->GetPpapiHost(), instance, params.pp_resource(), host_->GetPpapiHost(), instance, params.pp_resource(),
broker_filter)); broker_filter));
} }
case PpapiHostMsg_Ext_CrxFileSystem_Create::ID: {
PepperCrxFileSystemMessageFilter* crxfs_filter =
PepperCrxFileSystemMessageFilter::Create(instance, host_);
if (!crxfs_filter)
return scoped_ptr<ResourceHost>();
return scoped_ptr<ResourceHost>(new MessageFilterHost(
host, instance, params.pp_resource(), crxfs_filter));
}
case PpapiHostMsg_Talk_Create::ID: case PpapiHostMsg_Talk_Create::ID:
return scoped_ptr<ResourceHost>(new PepperTalkHost( return scoped_ptr<ResourceHost>(new PepperTalkHost(
host_, instance, params.pp_resource())); host_, instance, params.pp_resource()));
...@@ -103,6 +95,22 @@ scoped_ptr<ResourceHost> ChromeBrowserPepperHostFactory::CreateResourceHost( ...@@ -103,6 +95,22 @@ scoped_ptr<ResourceHost> ChromeBrowserPepperHostFactory::CreateResourceHost(
host_, instance, params.pp_resource())); host_, instance, params.pp_resource()));
} }
} }
// Permissions for the following interfaces will be checked at the
// time of the corresponding instance's methods calls (because
// permission check can be performed only on the UI
// thread). Currently these interfaces are available only for
// whitelisted apps which may not have access to the other private
// interfaces.
if (message.type() == PpapiHostMsg_Ext_CrxFileSystem_Create::ID) {
PepperCrxFileSystemMessageFilter* crxfs_filter =
PepperCrxFileSystemMessageFilter::Create(instance, host_);
if (!crxfs_filter)
return scoped_ptr<ResourceHost>();
return scoped_ptr<ResourceHost>(new MessageFilterHost(
host, instance, params.pp_resource(), crxfs_filter));
}
return scoped_ptr<ResourceHost>(); return scoped_ptr<ResourceHost>();
} }
......
...@@ -7,11 +7,14 @@ ...@@ -7,11 +7,14 @@
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_system.h" #include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/pepper_permission_util.h"
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h" #include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h" #include "chrome/common/extensions/extension.h"
#include "content/public/browser/browser_ppapi_host.h" #include "content/public/browser/browser_ppapi_host.h"
#include "content/public/browser/child_process_security_policy.h" #include "content/public/browser/child_process_security_policy.h"
#include "content/public/browser/render_view_host.h"
#include "extensions/common/constants.h" #include "extensions/common/constants.h"
#include "ppapi/c/pp_errors.h" #include "ppapi/c/pp_errors.h"
#include "ppapi/host/dispatch_host_message.h" #include "ppapi/host/dispatch_host_message.h"
...@@ -22,6 +25,14 @@ ...@@ -22,6 +25,14 @@
namespace chrome { namespace chrome {
namespace {
const char* kPredefinedAllowedCrxFsOrigins[] = {
"6EAED1924DB611B6EEF2A664BD077BE7EAD33B8F" // see crbug.com/234789
};
} // namespace
// static // static
PepperCrxFileSystemMessageFilter* PepperCrxFileSystemMessageFilter::Create( PepperCrxFileSystemMessageFilter* PepperCrxFileSystemMessageFilter::Create(
PP_Instance instance, content::BrowserPpapiHost* host) { PP_Instance instance, content::BrowserPpapiHost* host) {
...@@ -45,6 +56,8 @@ PepperCrxFileSystemMessageFilter::PepperCrxFileSystemMessageFilter( ...@@ -45,6 +56,8 @@ PepperCrxFileSystemMessageFilter::PepperCrxFileSystemMessageFilter(
: render_process_id_(render_process_id), : render_process_id_(render_process_id),
profile_directory_(profile_directory), profile_directory_(profile_directory),
document_url_(document_url) { document_url_(document_url) {
for (size_t i = 0; i < arraysize(kPredefinedAllowedCrxFsOrigins); ++i)
allowed_crxfs_origins_.insert(kPredefinedAllowedCrxFsOrigins[i]);
} }
PepperCrxFileSystemMessageFilter::~PepperCrxFileSystemMessageFilter() { PepperCrxFileSystemMessageFilter::~PepperCrxFileSystemMessageFilter() {
...@@ -68,13 +81,14 @@ int32_t PepperCrxFileSystemMessageFilter::OnResourceMessageReceived( ...@@ -68,13 +81,14 @@ int32_t PepperCrxFileSystemMessageFilter::OnResourceMessageReceived(
return PP_ERROR_FAILED; return PP_ERROR_FAILED;
} }
std::string PepperCrxFileSystemMessageFilter::CreateIsolatedFileSystem() { Profile* PepperCrxFileSystemMessageFilter::GetProfile() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (!document_url_.SchemeIs(extensions::kExtensionScheme))
return std::string();
ProfileManager* profile_manager = g_browser_process->profile_manager(); ProfileManager* profile_manager = g_browser_process->profile_manager();
Profile* profile = profile_manager->GetProfile(profile_directory_); return profile_manager->GetProfile(profile_directory_);
}
std::string PepperCrxFileSystemMessageFilter::CreateIsolatedFileSystem(
Profile* profile) {
extensions::ExtensionSystem* extension_system = extensions::ExtensionSystem* extension_system =
extensions::ExtensionSystem::Get(profile); extensions::ExtensionSystem::Get(profile);
if (!extension_system) if (!extension_system)
...@@ -100,7 +114,16 @@ std::string PepperCrxFileSystemMessageFilter::CreateIsolatedFileSystem() { ...@@ -100,7 +114,16 @@ std::string PepperCrxFileSystemMessageFilter::CreateIsolatedFileSystem() {
int32_t PepperCrxFileSystemMessageFilter::OnOpenFileSystem( int32_t PepperCrxFileSystemMessageFilter::OnOpenFileSystem(
ppapi::host::HostMessageContext* context) { ppapi::host::HostMessageContext* context) {
const std::string fsid = CreateIsolatedFileSystem(); Profile* profile = GetProfile();
if (!IsExtensionOrSharedModuleWhitelisted(profile,
document_url_,
allowed_crxfs_origins_,
switches::kAllowNaClCrxFsAPI)) {
LOG(ERROR) << "Host " << document_url_.host() << " cannot use CrxFs API.";
return PP_ERROR_NOACCESS;
}
const std::string fsid = CreateIsolatedFileSystem(profile);
if (fsid.empty()) { if (fsid.empty()) {
context->reply_msg = context->reply_msg =
PpapiPluginMsg_Ext_CrxFileSystem_BrowserOpenReply(std::string()); PpapiPluginMsg_Ext_CrxFileSystem_BrowserOpenReply(std::string());
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#ifndef CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_CRX_FILE_SYSTEM_MESSAGE_FILTER_H_ #ifndef CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_CRX_FILE_SYSTEM_MESSAGE_FILTER_H_
#define CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_CRX_FILE_SYSTEM_MESSAGE_FILTER_H_ #define CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_CRX_FILE_SYSTEM_MESSAGE_FILTER_H_
#include <set>
#include <string> #include <string>
#include "base/files/file_path.h" #include "base/files/file_path.h"
...@@ -14,6 +15,8 @@ ...@@ -14,6 +15,8 @@
#include "ppapi/host/resource_host.h" #include "ppapi/host/resource_host.h"
#include "ppapi/host/resource_message_filter.h" #include "ppapi/host/resource_message_filter.h"
class Profile;
namespace content { namespace content {
class BrowserPpapiHost; class BrowserPpapiHost;
} }
...@@ -48,10 +51,12 @@ class PepperCrxFileSystemMessageFilter ...@@ -48,10 +51,12 @@ class PepperCrxFileSystemMessageFilter
virtual ~PepperCrxFileSystemMessageFilter(); virtual ~PepperCrxFileSystemMessageFilter();
Profile* GetProfile();
// Returns filesystem id of isolated filesystem if valid, or empty string // Returns filesystem id of isolated filesystem if valid, or empty string
// otherwise. This must run on the UI thread because ProfileManager only // otherwise. This must run on the UI thread because ProfileManager only
// allows access on that thread. // allows access on that thread.
std::string CreateIsolatedFileSystem(); std::string CreateIsolatedFileSystem(Profile* profile);
int32_t OnOpenFileSystem(ppapi::host::HostMessageContext* context); int32_t OnOpenFileSystem(ppapi::host::HostMessageContext* context);
...@@ -59,6 +64,9 @@ class PepperCrxFileSystemMessageFilter ...@@ -59,6 +64,9 @@ class PepperCrxFileSystemMessageFilter
const base::FilePath& profile_directory_; const base::FilePath& profile_directory_;
const GURL document_url_; const GURL document_url_;
// Set of origins that can use CrxFs private APIs from NaCl.
std::set<std::string> allowed_crxfs_origins_;
DISALLOW_COPY_AND_ASSIGN(PepperCrxFileSystemMessageFilter); DISALLOW_COPY_AND_ASSIGN(PepperCrxFileSystemMessageFilter);
}; };
......
...@@ -1280,6 +1280,8 @@ ...@@ -1280,6 +1280,8 @@
'browser/pepper_broker_infobar_delegate.h', 'browser/pepper_broker_infobar_delegate.h',
'browser/pepper_flash_settings_manager.cc', 'browser/pepper_flash_settings_manager.cc',
'browser/pepper_flash_settings_manager.h', 'browser/pepper_flash_settings_manager.h',
'browser/pepper_permission_util.cc',
'browser/pepper_permission_util.h',
'browser/performance_monitor/constants.cc', 'browser/performance_monitor/constants.cc',
'browser/performance_monitor/constants.h', 'browser/performance_monitor/constants.h',
'browser/performance_monitor/database.cc', 'browser/performance_monitor/database.cc',
......
...@@ -43,6 +43,10 @@ const char kAllowHttpScreenCapture[] = "allow-http-screen-capture"; ...@@ -43,6 +43,10 @@ const char kAllowHttpScreenCapture[] = "allow-http-screen-capture";
const char kAllowLegacyExtensionManifests[] = const char kAllowLegacyExtensionManifests[] =
"allow-legacy-extension-manifests"; "allow-legacy-extension-manifests";
// Specifies comma-separated list of extension ids or hosts to grant
// access to CRX file system APIs.
const char kAllowNaClCrxFsAPI[] = "allow-nacl-crxfs-api";
// Specifies comma-separated list of extension ids or hosts to grant // Specifies comma-separated list of extension ids or hosts to grant
// access to TCP/UDP socket APIs. // access to TCP/UDP socket APIs.
const char kAllowNaClSocketAPI[] = "allow-nacl-socket-api"; const char kAllowNaClSocketAPI[] = "allow-nacl-socket-api";
......
...@@ -30,6 +30,7 @@ extern const char kAllowFileAccess[]; ...@@ -30,6 +30,7 @@ extern const char kAllowFileAccess[];
extern const char kAllowHTTPBackgroundPage[]; extern const char kAllowHTTPBackgroundPage[];
extern const char kAllowHttpScreenCapture[]; extern const char kAllowHttpScreenCapture[];
extern const char kAllowLegacyExtensionManifests[]; extern const char kAllowLegacyExtensionManifests[];
extern const char kAllowNaClCrxFsAPI[];
extern const char kAllowNaClSocketAPI[]; extern const char kAllowNaClSocketAPI[];
extern const char kAllowOutdatedPlugins[]; extern const char kAllowOutdatedPlugins[];
extern const char kAllowRunningInsecureContent[]; extern const char kAllowRunningInsecureContent[];
......
...@@ -80,7 +80,7 @@ scoped_ptr<ResourceHost> ContentBrowserPepperHostFactory::CreateResourceHost( ...@@ -80,7 +80,7 @@ scoped_ptr<ResourceHost> ContentBrowserPepperHostFactory::CreateResourceHost(
// Permissions for the following interfaces will be checked at the // Permissions for the following interfaces will be checked at the
// time of the corresponding instance's methods calls (because // time of the corresponding instance's methods calls (because
// permission check can be performed only on the UI // permission check can be performed only on the UI
// thread). Currently thise interfaces are available only for // thread). Currently these interfaces are available only for
// whitelisted apps which may not have access to the other private // whitelisted apps which may not have access to the other private
// interfaces. // interfaces.
if (message.type() == PpapiHostMsg_HostResolverPrivate_Create::ID) { if (message.type() == PpapiHostMsg_HostResolverPrivate_Create::ID) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment