diff --git a/chrome/browser/browsing_data/browsing_data_remover.cc b/chrome/browser/browsing_data/browsing_data_remover.cc index 7d3c5dae68d040..f21e2ae3f459f5 100644 --- a/chrome/browser/browsing_data/browsing_data_remover.cc +++ b/chrome/browser/browsing_data/browsing_data_remover.cc @@ -406,6 +406,7 @@ void BrowsingDataRemover::RemoveImpl(int remove_mask, base::Unretained(this))); } +#if defined(ENABLE_PLUGINS) // Plugin is data not separated for protected and unprotected web origins. We // check the origin_set_mask_ to prevent unintended deletion. if (remove_mask & REMOVE_PLUGIN_DATA && @@ -419,6 +420,7 @@ void BrowsingDataRemover::RemoveImpl(int remove_mask, plugin_data_remover_->StartRemoving(delete_begin_); watcher_.StartWatching(event, this); } +#endif if (remove_mask & REMOVE_PASSWORDS) { content::RecordAction(UserMetricsAction("ClearBrowsingData_Passwords")); diff --git a/chrome/browser/browsing_data/browsing_data_remover.h b/chrome/browser/browsing_data/browsing_data_remover.h index b0a39bc3cc0973..ffd876ef610b52 100644 --- a/chrome/browser/browsing_data/browsing_data_remover.h +++ b/chrome/browser/browsing_data/browsing_data_remover.h @@ -366,11 +366,11 @@ class BrowsingDataRemover : public content::NotificationObserver, scoped_refptr main_context_getter_; scoped_refptr media_context_getter_; +#if defined(ENABLE_PLUGINS) // Used to delete plugin data. scoped_ptr plugin_data_remover_; base::WaitableEventWatcher watcher_; -#if defined(ENABLE_PLUGINS) // Used to deauthorize content licenses for Pepper Flash. scoped_ptr pepper_flash_settings_manager_; #endif diff --git a/content/browser/plugin_data_remover_impl.cc b/content/browser/plugin_data_remover_impl.cc index 679b9acf8515e8..76043dbea74986 100644 --- a/content/browser/plugin_data_remover_impl.cc +++ b/content/browser/plugin_data_remover_impl.cc @@ -20,13 +20,10 @@ #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_thread.h" #include "content/public/common/pepper_plugin_info.h" +#include "ppapi/proxy/ppapi_messages.h" #include "webkit/plugins/npapi/plugin_utils.h" #include "webkit/plugins/plugin_constants.h" -#if defined(ENABLE_PLUGINS) -#include "ppapi/proxy/ppapi_messages.h" -#endif - namespace content { namespace { @@ -181,10 +178,8 @@ class PluginDataRemoverImpl::Context IPC_BEGIN_MESSAGE_MAP(Context, message) IPC_MESSAGE_HANDLER(PluginHostMsg_ClearSiteDataResult, OnClearSiteDataResult) -#if defined(ENABLE_PLUGINS) IPC_MESSAGE_HANDLER(PpapiHostMsg_ClearSiteDataResult, OnPpapiClearSiteDataResult) -#endif IPC_MESSAGE_UNHANDLED_ERROR() IPC_END_MESSAGE_MAP() @@ -205,7 +200,6 @@ class PluginDataRemoverImpl::Context friend class base::DeleteHelper; virtual ~Context() {} -#if defined(ENABLE_PLUGINS) IPC::Message* CreatePpapiClearSiteDataMsg(uint64 max_age) { FilePath profile_path = PepperFileMessageFilter::GetDataDirName(browser_context_path_); @@ -222,13 +216,6 @@ class PluginDataRemoverImpl::Context return new PpapiMsg_ClearSiteData(0u, plugin_data_path, std::string(), kClearAllData, max_age); } -#else - IPC::Message* CreatePpapiClearSiteDataMsg(uint64 max_age) { - NOTREACHED() << "CreatePpapiClearSiteDataMsg called with " - << "ENABLE_PLUGINS undefined."; - return NULL; - } -#endif // defined(ENABLE_PLUGINS) // Connects the client side of a newly opened plug-in channel. void ConnectToChannel(const IPC::ChannelHandle& handle, bool is_ppapi) { diff --git a/content/content_browser.gypi b/content/content_browser.gypi index e61c9839efaadb..4bb7050fbc3f9c 100644 --- a/content/content_browser.gypi +++ b/content/content_browser.gypi @@ -1133,6 +1133,8 @@ ], }, { # enable_plugins==0 'sources!': [ + 'browser/plugin_data_remover_impl.cc', + 'browser/plugin_data_remover_impl.h', 'browser/ppapi_plugin_process_host.cc', ], 'sources/': [ diff --git a/content/content_plugin.gypi b/content/content_plugin.gypi index cab0b488d282b6..27dd243fab6974 100644 --- a/content/content_plugin.gypi +++ b/content/content_plugin.gypi @@ -3,63 +3,67 @@ # found in the LICENSE file. { - 'dependencies': [ - '../skia/skia.gyp:skia', - '../third_party/npapi/npapi.gyp:npapi', - '../webkit/support/webkit_support.gyp:glue', - ], - 'include_dirs': [ - '<(INTERMEDIATE_DIR)', - ], - 'sources': [ - # All .cc, .h, .m, and .mm files under plugins except for tests and - # mocks. - 'plugin/plugin_channel.cc', - 'plugin/plugin_channel.h', - 'plugin/plugin_interpose_util_mac.mm', - 'plugin/plugin_interpose_util_mac.h', - 'plugin/plugin_main.cc', - 'plugin/plugin_main_linux.cc', - 'plugin/plugin_main_mac.mm', - 'plugin/plugin_thread.cc', - 'plugin/plugin_thread.h', - 'plugin/webplugin_accelerated_surface_proxy_mac.cc', - 'plugin/webplugin_accelerated_surface_proxy_mac.h', - 'plugin/webplugin_delegate_stub.cc', - 'plugin/webplugin_delegate_stub.h', - 'plugin/webplugin_proxy.cc', - 'plugin/webplugin_proxy.h', - 'public/plugin/content_plugin_client.h', - ], - # These are layered in conditionals in the event other platforms - # end up using this module as well. 'conditions': [ - ['os_bsd==1', { - 'sources/': [ - ['exclude', '^plugin/plugin_main_linux\\.cc$'], + ['enable_plugins==1', { + 'dependencies': [ + '../skia/skia.gyp:skia', + '../third_party/npapi/npapi.gyp:npapi', + '../webkit/support/webkit_support.gyp:glue', ], - }], - ['OS=="win"', { 'include_dirs': [ - '<(DEPTH)/third_party/wtl/include', + '<(INTERMEDIATE_DIR)', ], - }], - ['toolkit_uses_gtk == 1', { - 'dependencies': [ - '../build/linux/system.gyp:gtk', + 'sources': [ + # All .cc, .h, .m, and .mm files under plugins except for tests and + # mocks. + 'plugin/plugin_channel.cc', + 'plugin/plugin_channel.h', + 'plugin/plugin_interpose_util_mac.mm', + 'plugin/plugin_interpose_util_mac.h', + 'plugin/plugin_main.cc', + 'plugin/plugin_main_linux.cc', + 'plugin/plugin_main_mac.mm', + 'plugin/plugin_thread.cc', + 'plugin/plugin_thread.h', + 'plugin/webplugin_accelerated_surface_proxy_mac.cc', + 'plugin/webplugin_accelerated_surface_proxy_mac.h', + 'plugin/webplugin_delegate_stub.cc', + 'plugin/webplugin_delegate_stub.h', + 'plugin/webplugin_proxy.cc', + 'plugin/webplugin_proxy.h', + 'public/plugin/content_plugin_client.h', + ], + # These are layered in conditionals in the event other platforms + # end up using this module as well. + 'conditions': [ + ['os_bsd==1', { + 'sources/': [ + ['exclude', '^plugin/plugin_main_linux\\.cc$'], + ], + }], + ['OS=="win"', { + 'include_dirs': [ + '<(DEPTH)/third_party/wtl/include', + ], + }], + ['toolkit_uses_gtk == 1', { + 'dependencies': [ + '../build/linux/system.gyp:gtk', + ], + 'link_settings': { + 'libraries': [ + '-lXext', + ], + }, + }], + ['use_aura==1 and OS!="win"', { + 'link_settings': { + 'libraries': [ + '-lXext', + ], + }, + }], ], - 'link_settings': { - 'libraries': [ - '-lXext', - ], - }, - }], - ['use_aura==1 and OS!="win"', { - 'link_settings': { - 'libraries': [ - '-lXext', - ], - }, }], ], }