Commit 4b717264 authored by cm.sanchi's avatar cm.sanchi Committed by Commit Bot

chrome: Move Pepper files out of chrome namespace.

From discussion on chromium-dev, it was decided to remove 'chrome'
namespace.

Bug: 289619
Change-Id: Ibc473af04b1e28f59ebcec8a4e1cb5616d4eb8cb
Reviewed-on: https://chromium-review.googlesource.com/771091Reviewed-by: default avatarBernhard Bauer <bauerb@chromium.org>
Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Reviewed-by: default avatarRaymes Khoury <raymes@chromium.org>
Commit-Queue: srirama chandra sekhar <srirama.m@samsung.com>
Cr-Commit-Position: refs/heads/master@{#517779}
parent 16938949
...@@ -183,8 +183,8 @@ bool NaClBrowserDelegateImpl::IsNonSfiModeAllowed( ...@@ -183,8 +183,8 @@ bool NaClBrowserDelegateImpl::IsNonSfiModeAllowed(
#if BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(ENABLE_EXTENSIONS)
const extensions::ExtensionSet* extension_set = const extensions::ExtensionSet* extension_set =
&GetExtensionInfoMap(profile_directory)->extensions(); &GetExtensionInfoMap(profile_directory)->extensions();
return chrome::IsExtensionOrSharedModuleWhitelisted( return IsExtensionOrSharedModuleWhitelisted(manifest_url, extension_set,
manifest_url, extension_set, allowed_nonsfi_origins_); allowed_nonsfi_origins_);
#else #else
return false; return false;
#endif #endif
......
...@@ -458,7 +458,7 @@ void PepperFlashSettingsManager::Core::DeauthorizeContentLicensesAsync( ...@@ -458,7 +458,7 @@ void PepperFlashSettingsManager::Core::DeauthorizeContentLicensesAsync(
// ChromeOS used to store the device ID in a file but this is no longer used. // ChromeOS used to store the device ID in a file but this is no longer used.
// Wipe that file. // Wipe that file.
const base::FilePath& device_id_path = const base::FilePath& device_id_path =
chrome::DeviceIDFetcher::GetLegacyDeviceIDPath(profile_path); DeviceIDFetcher::GetLegacyDeviceIDPath(profile_path);
bool success = base::DeleteFile(device_id_path, false); bool success = base::DeleteFile(device_id_path, false);
BrowserThread::PostTask( BrowserThread::PostTask(
......
...@@ -59,10 +59,10 @@ bool ChromeContentBrowserClientPluginsPart:: ...@@ -59,10 +59,10 @@ bool ChromeContentBrowserClientPluginsPart::
&extensions::ExtensionRegistry::Get(profile)->enabled_extensions(); &extensions::ExtensionRegistry::Get(profile)->enabled_extensions();
} }
return chrome::IsExtensionOrSharedModuleWhitelisted( return IsExtensionOrSharedModuleWhitelisted(url, extension_set,
url, extension_set, allowed_file_handle_origins) || allowed_file_handle_origins) ||
chrome::IsHostAllowedByCommandLine( IsHostAllowedByCommandLine(url, extension_set,
url, extension_set, ::switches::kAllowNaClFileHandleAPI); ::switches::kAllowNaClFileHandleAPI);
#else #else
return false; return false;
#endif #endif
...@@ -84,8 +84,8 @@ bool ChromeContentBrowserClientPluginsPart::AllowPepperSocketAPI( ...@@ -84,8 +84,8 @@ bool ChromeContentBrowserClientPluginsPart::AllowPepperSocketAPI(
if (private_api) { if (private_api) {
// Access to private socket APIs is controlled by the whitelist. // Access to private socket APIs is controlled by the whitelist.
if (chrome::IsExtensionOrSharedModuleWhitelisted(url, extension_set, if (IsExtensionOrSharedModuleWhitelisted(url, extension_set,
allowed_socket_origin)) { allowed_socket_origin)) {
return true; return true;
} }
} else { } else {
...@@ -113,8 +113,8 @@ bool ChromeContentBrowserClientPluginsPart::AllowPepperSocketAPI( ...@@ -113,8 +113,8 @@ bool ChromeContentBrowserClientPluginsPart::AllowPepperSocketAPI(
} }
// Allow both public and private APIs if the command line says so. // Allow both public and private APIs if the command line says so.
return chrome::IsHostAllowedByCommandLine(url, extension_set, return IsHostAllowedByCommandLine(url, extension_set,
::switches::kAllowNaClSocketAPI); ::switches::kAllowNaClSocketAPI);
#else #else
return false; return false;
#endif #endif
...@@ -167,8 +167,8 @@ bool ChromeContentBrowserClientPluginsPart::IsPluginAllowedToUseDevChannelAPIs( ...@@ -167,8 +167,8 @@ bool ChromeContentBrowserClientPluginsPart::IsPluginAllowedToUseDevChannelAPIs(
} }
// Allow access for whitelisted applications. // Allow access for whitelisted applications.
if (chrome::IsExtensionOrSharedModuleWhitelisted( if (IsExtensionOrSharedModuleWhitelisted(url, extension_set,
url, extension_set, allowed_dev_channel_origins)) { allowed_dev_channel_origins)) {
return true; return true;
} }
#endif #endif
......
...@@ -47,14 +47,13 @@ ChromeBrowserPepperHostFactory::CreateResourceHost( ...@@ -47,14 +47,13 @@ ChromeBrowserPepperHostFactory::CreateResourceHost(
switch (message.type()) { switch (message.type()) {
case PpapiHostMsg_Broker_Create::ID: { case PpapiHostMsg_Broker_Create::ID: {
scoped_refptr<ResourceMessageFilter> broker_filter( scoped_refptr<ResourceMessageFilter> broker_filter(
new chrome::PepperBrokerMessageFilter(instance, host_)); new PepperBrokerMessageFilter(instance, host_));
return std::unique_ptr<ResourceHost>(new MessageFilterHost( return std::unique_ptr<ResourceHost>(new MessageFilterHost(
host_->GetPpapiHost(), instance, resource, broker_filter)); host_->GetPpapiHost(), instance, resource, broker_filter));
} }
case PpapiHostMsg_PlatformVerification_Create::ID: { case PpapiHostMsg_PlatformVerification_Create::ID: {
scoped_refptr<ResourceMessageFilter> pv_filter( scoped_refptr<ResourceMessageFilter> pv_filter(
new chrome::PepperPlatformVerificationMessageFilter(host_, new PepperPlatformVerificationMessageFilter(host_, instance));
instance));
return std::unique_ptr<ResourceHost>(new MessageFilterHost( return std::unique_ptr<ResourceHost>(new MessageFilterHost(
host_->GetPpapiHost(), instance, resource, pv_filter)); host_->GetPpapiHost(), instance, resource, pv_filter));
} }
...@@ -74,16 +73,16 @@ ChromeBrowserPepperHostFactory::CreateResourceHost( ...@@ -74,16 +73,16 @@ ChromeBrowserPepperHostFactory::CreateResourceHost(
switch (message.type()) { switch (message.type()) {
case PpapiHostMsg_Flash_Create::ID: case PpapiHostMsg_Flash_Create::ID:
return std::unique_ptr<ResourceHost>( return std::unique_ptr<ResourceHost>(
new chrome::PepperFlashBrowserHost(host_, instance, resource)); new PepperFlashBrowserHost(host_, instance, resource));
case PpapiHostMsg_FlashClipboard_Create::ID: { case PpapiHostMsg_FlashClipboard_Create::ID: {
scoped_refptr<ResourceMessageFilter> clipboard_filter( scoped_refptr<ResourceMessageFilter> clipboard_filter(
new chrome::PepperFlashClipboardMessageFilter); new PepperFlashClipboardMessageFilter);
return std::unique_ptr<ResourceHost>(new MessageFilterHost( return std::unique_ptr<ResourceHost>(new MessageFilterHost(
host_->GetPpapiHost(), instance, resource, clipboard_filter)); host_->GetPpapiHost(), instance, resource, clipboard_filter));
} }
case PpapiHostMsg_FlashDRM_Create::ID: case PpapiHostMsg_FlashDRM_Create::ID:
return std::unique_ptr<ResourceHost>( return std::unique_ptr<ResourceHost>(
new chrome::PepperFlashDRMHost(host_, instance, resource)); new PepperFlashDRMHost(host_, instance, resource));
} }
} }
...@@ -94,8 +93,8 @@ ChromeBrowserPepperHostFactory::CreateResourceHost( ...@@ -94,8 +93,8 @@ ChromeBrowserPepperHostFactory::CreateResourceHost(
// 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_IsolatedFileSystem_Create::ID) { if (message.type() == PpapiHostMsg_IsolatedFileSystem_Create::ID) {
chrome::PepperIsolatedFileSystemMessageFilter* isolated_fs_filter = PepperIsolatedFileSystemMessageFilter* isolated_fs_filter =
chrome::PepperIsolatedFileSystemMessageFilter::Create(instance, host_); PepperIsolatedFileSystemMessageFilter::Create(instance, host_);
if (!isolated_fs_filter) if (!isolated_fs_filter)
return std::unique_ptr<ResourceHost>(); return std::unique_ptr<ResourceHost>();
return std::unique_ptr<ResourceHost>( return std::unique_ptr<ResourceHost>(
......
...@@ -35,8 +35,6 @@ using content::BrowserPpapiHost; ...@@ -35,8 +35,6 @@ using content::BrowserPpapiHost;
using content::BrowserThread; using content::BrowserThread;
using content::RenderProcessHost; using content::RenderProcessHost;
namespace chrome {
namespace { namespace {
const char kDRMIdentifierFile[] = "Pepper DRM ID.0"; const char kDRMIdentifierFile[] = "Pepper DRM ID.0";
...@@ -211,5 +209,3 @@ void DeviceIDFetcher::RunCallbackOnIOThread(const std::string& id, ...@@ -211,5 +209,3 @@ void DeviceIDFetcher::RunCallbackOnIOThread(const std::string& id,
in_progress_ = false; in_progress_ = false;
callback_.Run(id, result); callback_.Run(id, result);
} }
} // namespace chrome
...@@ -20,8 +20,6 @@ namespace user_prefs { ...@@ -20,8 +20,6 @@ namespace user_prefs {
class PrefRegistrySyncable; class PrefRegistrySyncable;
} }
namespace chrome {
// This class allows asynchronously fetching a unique device ID. The callback // This class allows asynchronously fetching a unique device ID. The callback
// passed in when calling Start() will be called when the ID has been fetched // passed in when calling Start() will be called when the ID has been fetched
// or on error. // or on error.
...@@ -74,6 +72,4 @@ class DeviceIDFetcher : public base::RefCountedThreadSafe<DeviceIDFetcher> { ...@@ -74,6 +72,4 @@ class DeviceIDFetcher : public base::RefCountedThreadSafe<DeviceIDFetcher> {
DISALLOW_COPY_AND_ASSIGN(DeviceIDFetcher); DISALLOW_COPY_AND_ASSIGN(DeviceIDFetcher);
}; };
} // namespace chrome
#endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_DEVICE_ID_FETCHER_H_ #endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_DEVICE_ID_FETCHER_H_
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "base/synchronization/lock.h" #include "base/synchronization/lock.h"
namespace chrome {
// MonitorFinder maps a RenderFrameHost to the display ID on which the widget // MonitorFinder maps a RenderFrameHost to the display ID on which the widget
// is painting. This class operates on the IO thread while the RenderFrameHost // is painting. This class operates on the IO thread while the RenderFrameHost
// is on the UI thread, so the value returned by GetMonitor() may be 0 until // is on the UI thread, so the value returned by GetMonitor() may be 0 until
...@@ -47,6 +45,4 @@ class MonitorFinder : public base::RefCountedThreadSafe<MonitorFinder> { ...@@ -47,6 +45,4 @@ class MonitorFinder : public base::RefCountedThreadSafe<MonitorFinder> {
DISALLOW_COPY_AND_ASSIGN(MonitorFinder); DISALLOW_COPY_AND_ASSIGN(MonitorFinder);
}; };
} // namespace chrome
#endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_MONITOR_FINDER_MAC_H_ #endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_MONITOR_FINDER_MAC_H_
...@@ -9,8 +9,6 @@ ...@@ -9,8 +9,6 @@
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_frame_host.h"
namespace chrome {
MonitorFinder::MonitorFinder(int process_id, int render_frame_id) MonitorFinder::MonitorFinder(int process_id, int render_frame_id)
: process_id_(process_id), : process_id_(process_id),
render_frame_id_(render_frame_id), render_frame_id_(render_frame_id),
...@@ -58,5 +56,3 @@ void MonitorFinder::FetchMonitorFromWidget() { ...@@ -58,5 +56,3 @@ void MonitorFinder::FetchMonitorFromWidget() {
request_sent_ = false; request_sent_ = false;
display_id_ = display_id; display_id_ = display_id;
} }
} // namespace chrome
...@@ -23,8 +23,6 @@ using content::BrowserPpapiHost; ...@@ -23,8 +23,6 @@ using content::BrowserPpapiHost;
using content::BrowserThread; using content::BrowserThread;
using content::RenderProcessHost; using content::RenderProcessHost;
namespace chrome {
PepperBrokerMessageFilter::PepperBrokerMessageFilter(PP_Instance instance, PepperBrokerMessageFilter::PepperBrokerMessageFilter(PP_Instance instance,
BrowserPpapiHost* host) BrowserPpapiHost* host)
: document_url_(host->GetDocumentURLForInstance(instance)) { : document_url_(host->GetDocumentURLForInstance(instance)) {
...@@ -72,5 +70,3 @@ int32_t PepperBrokerMessageFilter::OnIsAllowed( ...@@ -72,5 +70,3 @@ int32_t PepperBrokerMessageFilter::OnIsAllowed(
return PP_OK; return PP_OK;
return PP_ERROR_FAILED; return PP_ERROR_FAILED;
} }
} // namespace chrome
...@@ -23,8 +23,6 @@ struct HostMessageContext; ...@@ -23,8 +23,6 @@ struct HostMessageContext;
} }
} }
namespace chrome {
// This filter handles messages for the PepperBrokerHost on the UI thread. // This filter handles messages for the PepperBrokerHost on the UI thread.
class PepperBrokerMessageFilter : public ppapi::host::ResourceMessageFilter { class PepperBrokerMessageFilter : public ppapi::host::ResourceMessageFilter {
public: public:
...@@ -49,6 +47,4 @@ class PepperBrokerMessageFilter : public ppapi::host::ResourceMessageFilter { ...@@ -49,6 +47,4 @@ class PepperBrokerMessageFilter : public ppapi::host::ResourceMessageFilter {
DISALLOW_COPY_AND_ASSIGN(PepperBrokerMessageFilter); DISALLOW_COPY_AND_ASSIGN(PepperBrokerMessageFilter);
}; };
} // namespace chrome
#endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_BROKER_MESSAGE_FILTER_H_ #endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_BROKER_MESSAGE_FILTER_H_
...@@ -38,8 +38,6 @@ using content::BrowserThread; ...@@ -38,8 +38,6 @@ using content::BrowserThread;
using content::RenderProcessHost; using content::RenderProcessHost;
using content::ServiceManagerConnection; using content::ServiceManagerConnection;
namespace chrome {
namespace { namespace {
// Get the CookieSettings on the UI thread for the given render process ID. // Get the CookieSettings on the UI thread for the given render process ID.
...@@ -209,5 +207,3 @@ device::mojom::WakeLock* PepperFlashBrowserHost::GetWakeLock() { ...@@ -209,5 +207,3 @@ device::mojom::WakeLock* PepperFlashBrowserHost::GetWakeLock() {
std::move(request)); std::move(request));
return wake_lock_.get(); return wake_lock_.get();
} }
} // namespace chrome
...@@ -29,8 +29,6 @@ class CookieSettings; ...@@ -29,8 +29,6 @@ class CookieSettings;
class GURL; class GURL;
namespace chrome {
class PepperFlashBrowserHost : public ppapi::host::ResourceHost { class PepperFlashBrowserHost : public ppapi::host::ResourceHost {
public: public:
PepperFlashBrowserHost(content::BrowserPpapiHost* host, PepperFlashBrowserHost(content::BrowserPpapiHost* host,
...@@ -74,6 +72,4 @@ class PepperFlashBrowserHost : public ppapi::host::ResourceHost { ...@@ -74,6 +72,4 @@ class PepperFlashBrowserHost : public ppapi::host::ResourceHost {
DISALLOW_COPY_AND_ASSIGN(PepperFlashBrowserHost); DISALLOW_COPY_AND_ASSIGN(PepperFlashBrowserHost);
}; };
} // namespace chrome
#endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FLASH_BROWSER_HOST_H_ #endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FLASH_BROWSER_HOST_H_
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
using content::BrowserThread; using content::BrowserThread;
namespace chrome {
namespace { namespace {
const size_t kMaxClipboardWriteSize = 1000000; const size_t kMaxClipboardWriteSize = 1000000;
...@@ -370,5 +368,3 @@ int32_t PepperFlashClipboardMessageFilter::OnMsgGetSequenceNumber( ...@@ -370,5 +368,3 @@ int32_t PepperFlashClipboardMessageFilter::OnMsgGetSequenceNumber(
PpapiPluginMsg_FlashClipboard_GetSequenceNumberReply(sequence_number); PpapiPluginMsg_FlashClipboard_GetSequenceNumberReply(sequence_number);
return PP_OK; return PP_OK;
} }
} // namespace chrome
...@@ -25,8 +25,6 @@ namespace ui { ...@@ -25,8 +25,6 @@ namespace ui {
class ScopedClipboardWriter; class ScopedClipboardWriter;
} }
namespace chrome {
// Resource message filter for accessing the clipboard in Pepper. Pepper // Resource message filter for accessing the clipboard in Pepper. Pepper
// supports reading/writing custom formats from the clipboard. Currently, all // supports reading/writing custom formats from the clipboard. Currently, all
// custom formats that are read/written from the clipboard through pepper are // custom formats that are read/written from the clipboard through pepper are
...@@ -75,6 +73,4 @@ class PepperFlashClipboardMessageFilter ...@@ -75,6 +73,4 @@ class PepperFlashClipboardMessageFilter
DISALLOW_COPY_AND_ASSIGN(PepperFlashClipboardMessageFilter); DISALLOW_COPY_AND_ASSIGN(PepperFlashClipboardMessageFilter);
}; };
} // namespace chrome
#endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FLASH_CLIPBOARD_MESSAGE_FILTER_H_ #endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FLASH_CLIPBOARD_MESSAGE_FILTER_H_
...@@ -35,8 +35,6 @@ ...@@ -35,8 +35,6 @@
using content::BrowserPpapiHost; using content::BrowserPpapiHost;
namespace chrome {
namespace { namespace {
const char kVoucherFilename[] = "plugin.vch"; const char kVoucherFilename[] = "plugin.vch";
} }
...@@ -198,5 +196,3 @@ void PepperFlashDRMHost::GotDeviceID( ...@@ -198,5 +196,3 @@ void PepperFlashDRMHost::GotDeviceID(
host()->SendReply(reply_context, host()->SendReply(reply_context,
PpapiPluginMsg_FlashDRM_GetDeviceIDReply(id)); PpapiPluginMsg_FlashDRM_GetDeviceIDReply(id));
} }
} // namespace chrome
...@@ -23,7 +23,6 @@ namespace IPC { ...@@ -23,7 +23,6 @@ namespace IPC {
class Message; class Message;
} }
namespace chrome {
class MonitorFinder; class MonitorFinder;
class PepperFlashDRMHost : public ppapi::host::ResourceHost { class PepperFlashDRMHost : public ppapi::host::ResourceHost {
...@@ -58,6 +57,4 @@ class PepperFlashDRMHost : public ppapi::host::ResourceHost { ...@@ -58,6 +57,4 @@ class PepperFlashDRMHost : public ppapi::host::ResourceHost {
DISALLOW_COPY_AND_ASSIGN(PepperFlashDRMHost); DISALLOW_COPY_AND_ASSIGN(PepperFlashDRMHost);
}; };
} // namespace chrome
#endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FLASH_DRM_HOST_H_ #endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_FLASH_DRM_HOST_H_
...@@ -32,8 +32,6 @@ ...@@ -32,8 +32,6 @@
#include "extensions/common/extension_set.h" #include "extensions/common/extension_set.h"
#endif #endif
namespace chrome {
namespace { namespace {
const char* kPredefinedAllowedCrxFsOrigins[] = { const char* kPredefinedAllowedCrxFsOrigins[] = {
...@@ -200,5 +198,3 @@ int32_t PepperIsolatedFileSystemMessageFilter::OpenPluginPrivateFileSystem( ...@@ -200,5 +198,3 @@ int32_t PepperIsolatedFileSystemMessageFilter::OpenPluginPrivateFileSystem(
context->reply_msg = PpapiPluginMsg_IsolatedFileSystem_BrowserOpenReply(fsid); context->reply_msg = PpapiPluginMsg_IsolatedFileSystem_BrowserOpenReply(fsid);
return PP_OK; return PP_OK;
} }
} // namespace chrome
...@@ -31,8 +31,6 @@ struct HostMessageContext; ...@@ -31,8 +31,6 @@ struct HostMessageContext;
} // namespace host } // namespace host
} // namespace ppapi } // namespace ppapi
namespace chrome {
class PepperIsolatedFileSystemMessageFilter class PepperIsolatedFileSystemMessageFilter
: public ppapi::host::ResourceMessageFilter { : public ppapi::host::ResourceMessageFilter {
public: public:
...@@ -81,6 +79,4 @@ class PepperIsolatedFileSystemMessageFilter ...@@ -81,6 +79,4 @@ class PepperIsolatedFileSystemMessageFilter
DISALLOW_COPY_AND_ASSIGN(PepperIsolatedFileSystemMessageFilter); DISALLOW_COPY_AND_ASSIGN(PepperIsolatedFileSystemMessageFilter);
}; };
} // namespace chrome
#endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_ISOLATED_FILE_SYSTEM_MESSAGE_FILTER_H_ #endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_ISOLATED_FILE_SYSTEM_MESSAGE_FILTER_H_
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
#include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile.h"
#endif #endif
namespace chrome {
namespace { namespace {
#if BUILDFLAG(ENABLE_CDM_STORAGE_ID) #if BUILDFLAG(ENABLE_CDM_STORAGE_ID)
...@@ -165,5 +163,3 @@ void PepperPlatformVerificationMessageFilter::GetStorageIdCallback( ...@@ -165,5 +163,3 @@ void PepperPlatformVerificationMessageFilter::GetStorageIdCallback(
SendReply(reply_context, SendReply(reply_context,
PpapiHostMsg_PlatformVerification_GetStorageIdReply(storage_id)); PpapiHostMsg_PlatformVerification_GetStorageIdReply(storage_id));
} }
} // namespace chrome
...@@ -28,8 +28,6 @@ struct HostMessageContext; ...@@ -28,8 +28,6 @@ struct HostMessageContext;
} // namespace host } // namespace host
} // namespace ppapi } // namespace ppapi
namespace chrome {
// This filter handles messages for platform verification on the UI thread. // This filter handles messages for platform verification on the UI thread.
class PepperPlatformVerificationMessageFilter class PepperPlatformVerificationMessageFilter
: public ppapi::host::ResourceMessageFilter { : public ppapi::host::ResourceMessageFilter {
...@@ -76,6 +74,4 @@ class PepperPlatformVerificationMessageFilter ...@@ -76,6 +74,4 @@ class PepperPlatformVerificationMessageFilter
DISALLOW_COPY_AND_ASSIGN(PepperPlatformVerificationMessageFilter); DISALLOW_COPY_AND_ASSIGN(PepperPlatformVerificationMessageFilter);
}; };
} // namespace chrome
#endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_PLATFORM_VERIFICATION_MESSAGE_FILTER_H_ #endif // CHROME_BROWSER_RENDERER_HOST_PEPPER_PEPPER_PLATFORM_VERIFICATION_MESSAGE_FILTER_H_
...@@ -19,8 +19,6 @@ using extensions::Extension; ...@@ -19,8 +19,6 @@ using extensions::Extension;
using extensions::Manifest; using extensions::Manifest;
using extensions::SharedModuleInfo; using extensions::SharedModuleInfo;
namespace chrome {
namespace { namespace {
std::string HashHost(const std::string& host) { std::string HashHost(const std::string& host) {
...@@ -103,5 +101,3 @@ bool IsHostAllowedByCommandLine(const GURL& url, ...@@ -103,5 +101,3 @@ bool IsHostAllowedByCommandLine(const GURL& url,
return false; return false;
} }
} // namespace chrome
...@@ -14,8 +14,6 @@ namespace extensions { ...@@ -14,8 +14,6 @@ namespace extensions {
class ExtensionSet; class ExtensionSet;
} }
namespace chrome {
// Returns true if the extension (or an imported module if any) is whitelisted. // Returns true if the extension (or an imported module if any) is whitelisted.
// Module imports are at most one level deep (ie, a module that exports cannot // Module imports are at most one level deep (ie, a module that exports cannot
// import another extension). The extension is identified by the host of |url| // import another extension). The extension is identified by the host of |url|
...@@ -36,6 +34,4 @@ bool IsExtensionOrSharedModuleWhitelisted( ...@@ -36,6 +34,4 @@ bool IsExtensionOrSharedModuleWhitelisted(
bool IsHostAllowedByCommandLine(const GURL& url, bool IsHostAllowedByCommandLine(const GURL& url,
const extensions::ExtensionSet* extension_set, const extensions::ExtensionSet* extension_set,
const char* command_line_switch); const char* command_line_switch);
} // namespace chrome
#endif // CHROME_COMMON_PEPPER_PERMISSION_UTIL_H_ #endif // CHROME_COMMON_PEPPER_PERMISSION_UTIL_H_
...@@ -16,8 +16,6 @@ ...@@ -16,8 +16,6 @@
#include "extensions/common/features/feature_channel.h" #include "extensions/common/features/feature_channel.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
using chrome::IsExtensionOrSharedModuleWhitelisted;
namespace extensions { namespace extensions {
namespace { namespace {
......
...@@ -1395,11 +1395,11 @@ bool ChromeContentRendererClient::IsExternalPepperPlugin( ...@@ -1395,11 +1395,11 @@ bool ChromeContentRendererClient::IsExternalPepperPlugin(
#if BUILDFLAG(ENABLE_PLUGINS) && BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(ENABLE_PLUGINS) && BUILDFLAG(ENABLE_EXTENSIONS)
bool ChromeContentRendererClient::IsExtensionOrSharedModuleWhitelisted( bool ChromeContentRendererClient::IsExtensionOrSharedModuleWhitelisted(
const GURL& url, const std::set<std::string>& whitelist) { const GURL& url,
const std::set<std::string>& whitelist) {
const extensions::ExtensionSet* extension_set = const extensions::ExtensionSet* extension_set =
extensions::RendererExtensionRegistry::Get()->GetMainThreadExtensionSet(); extensions::RendererExtensionRegistry::Get()->GetMainThreadExtensionSet();
return chrome::IsExtensionOrSharedModuleWhitelisted(url, extension_set, return ::IsExtensionOrSharedModuleWhitelisted(url, extension_set, whitelist);
whitelist);
} }
#endif #endif
......
...@@ -238,7 +238,8 @@ class ChromeContentRendererClient ...@@ -238,7 +238,8 @@ class ChromeContentRendererClient
#if BUILDFLAG(ENABLE_PLUGINS) && BUILDFLAG(ENABLE_EXTENSIONS) #if BUILDFLAG(ENABLE_PLUGINS) && BUILDFLAG(ENABLE_EXTENSIONS)
static bool IsExtensionOrSharedModuleWhitelisted( static bool IsExtensionOrSharedModuleWhitelisted(
const GURL& url, const std::set<std::string>& whitelist); const GURL& url,
const std::set<std::string>& whitelist);
#endif #endif
private: private:
......
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