summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-20 17:56:49 +0000
committerwez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-20 17:56:49 +0000
commit5bc5c15301e555c7d22b27d2b30c56b6ca1770ac (patch)
tree3224de17fcacd84b3e723922b9911d1f73a33c50
parente50540ec88e9a2102a028336335fc8eb4ee026ee (diff)
downloadchromium_src-5bc5c15301e555c7d22b27d2b30c56b6ca1770ac.zip
chromium_src-5bc5c15301e555c7d22b27d2b30c56b6ca1770ac.tar.gz
chromium_src-5bc5c15301e555c7d22b27d2b30c56b6ca1770ac.tar.bz2
Remove RemoteAccessClientFirewallTraversal policy and code paths.
BUG=96318 TEST= Review URL: http://codereview.chromium.org/8275012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106521 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/policy/policy_templates.json5
-rw-r--r--chrome/browser/policy/configuration_policy_pref_store.cc2
-rw-r--r--chrome/browser/policy/configuration_policy_pref_store_unittest.cc2
-rw-r--r--chrome/browser/prefs/browser_prefs.cc2
-rw-r--r--chrome/browser/remoting/firewall_traversal_observer.cc98
-rw-r--r--chrome/browser/remoting/firewall_traversal_observer.h43
-rw-r--r--chrome/browser/remoting/firewall_traversal_observer_unittest.cc51
-rw-r--r--chrome/browser/ui/tab_contents/tab_contents_wrapper.cc2
-rw-r--r--chrome/browser/ui/tab_contents/tab_contents_wrapper.h2
-rw-r--r--chrome/chrome_browser.gypi2
-rw-r--r--chrome/chrome_tests.gypi1
-rw-r--r--chrome/common/pref_names.cc2
-rw-r--r--chrome/common/pref_names.h1
-rw-r--r--chrome/test/functional/policy_prefs_ui.py1
-rw-r--r--chrome/test/ui/ppapi_uitest.cc3
-rw-r--r--content/common/view_messages.h12
-rw-r--r--content/renderer/pepper_plugin_delegate_impl.cc24
-rw-r--r--content/renderer/pepper_plugin_delegate_impl.h11
-rw-r--r--content/renderer/render_view_impl.cc11
-rw-r--r--content/renderer/render_view_impl.h4
-rw-r--r--ppapi/api/dev/ppb_query_policy_dev.idl26
-rw-r--r--ppapi/api/dev/ppp_policy_update_dev.idl27
-rw-r--r--ppapi/c/dev/ppb_query_policy_dev.h47
-rw-r--r--ppapi/c/dev/ppp_policy_update_dev.h47
-rw-r--r--ppapi/ppapi_cpp.gypi3
-rw-r--r--ppapi/ppapi_shared.gypi1
-rw-r--r--ppapi/ppapi_tests.gypi2
-rw-r--r--ppapi/proxy/ppb_instance_proxy.cc5
-rw-r--r--ppapi/proxy/ppb_instance_proxy.h1
-rw-r--r--ppapi/tests/all_c_includes.h2
-rw-r--r--ppapi/tests/test_query_policy.cc56
-rw-r--r--ppapi/tests/test_query_policy.h30
-rw-r--r--ppapi/thunk/interfaces_ppb_public_dev.h2
-rw-r--r--ppapi/thunk/ppb_instance_api.h3
-rw-r--r--ppapi/thunk/ppb_query_policy_thunk.cc33
-rw-r--r--ppapi/thunk/thunk.h2
-rw-r--r--remoting/client/plugin/chromoting_instance.cc106
-rw-r--r--remoting/client/plugin/chromoting_instance.h19
-rw-r--r--webkit/plugins/ppapi/mock_plugin_delegate.cc6
-rw-r--r--webkit/plugins/ppapi/mock_plugin_delegate.h2
-rw-r--r--webkit/plugins/ppapi/plugin_delegate.h10
-rw-r--r--webkit/plugins/ppapi/plugin_module.cc1
-rw-r--r--webkit/plugins/ppapi/ppapi_plugin_instance.cc25
-rw-r--r--webkit/plugins/ppapi/ppapi_plugin_instance.h5
44 files changed, 5 insertions, 735 deletions
diff --git a/chrome/app/policy/policy_templates.json b/chrome/app/policy/policy_templates.json
index e2fc49e..5b52da8 100644
--- a/chrome/app/policy/policy_templates.json
+++ b/chrome/app/policy/policy_templates.json
@@ -348,10 +348,13 @@
'type': 'main',
'supported_on': ['chrome.*:14-', 'chrome_os:0.14-'],
'features': {'dynamic_refresh': 1},
+ # Mark this 'removed' when http://crbug.com/100216 is resolved.
+ 'deprecated': True,
'example_value': False,
'id': 94,
'caption': '''Enable firewall traversal from remote access client''',
- 'desc': '''Enables usage of STUN and relay servers when connecting to a remote client.
+ 'desc': '''This policy is no longer supported.
+ Enables usage of STUN and relay servers when connecting to a remote client.
If this setting is enabled, then this machine can discover and connect to remote host machines even if they are separated by a firewall.
diff --git a/chrome/browser/policy/configuration_policy_pref_store.cc b/chrome/browser/policy/configuration_policy_pref_store.cc
index 4f110f8..3616e6d 100644
--- a/chrome/browser/policy/configuration_policy_pref_store.cc
+++ b/chrome/browser/policy/configuration_policy_pref_store.cc
@@ -277,8 +277,6 @@ const ConfigurationPolicyPrefKeeper::PolicyToPreferenceMapEntry
{ Value::TYPE_BOOLEAN, kPolicyInstantEnabled, prefs::kInstantEnabled },
{ Value::TYPE_BOOLEAN, kPolicyDefaultBrowserSettingEnabled,
prefs::kDefaultBrowserSettingEnabled },
- { Value::TYPE_BOOLEAN, kPolicyRemoteAccessClientFirewallTraversal,
- prefs::kRemoteAccessClientFirewallTraversal },
{ Value::TYPE_BOOLEAN, kPolicyRemoteAccessHostFirewallTraversal,
prefs::kRemoteAccessHostFirewallTraversal },
{ Value::TYPE_BOOLEAN, kPolicyCloudPrintProxyEnabled,
diff --git a/chrome/browser/policy/configuration_policy_pref_store_unittest.cc b/chrome/browser/policy/configuration_policy_pref_store_unittest.cc
index 4e8e360..17ecf826 100644
--- a/chrome/browser/policy/configuration_policy_pref_store_unittest.cc
+++ b/chrome/browser/policy/configuration_policy_pref_store_unittest.cc
@@ -206,8 +206,6 @@ INSTANTIATE_TEST_CASE_P(
prefs::kPrintingEnabled),
TypeAndName(kPolicyJavascriptEnabled,
prefs::kWebKitJavascriptEnabled),
- TypeAndName(kPolicyRemoteAccessClientFirewallTraversal,
- prefs::kRemoteAccessClientFirewallTraversal),
TypeAndName(kPolicyRemoteAccessHostFirewallTraversal,
prefs::kRemoteAccessHostFirewallTraversal),
TypeAndName(kPolicyCloudPrintProxyEnabled,
diff --git a/chrome/browser/prefs/browser_prefs.cc b/chrome/browser/prefs/browser_prefs.cc
index 888ced4..8b1420a 100644
--- a/chrome/browser/prefs/browser_prefs.cc
+++ b/chrome/browser/prefs/browser_prefs.cc
@@ -41,7 +41,6 @@
#include "chrome/browser/profiles/profile_impl.h"
#include "chrome/browser/profiles/profile_info_cache.h"
#include "chrome/browser/profiles/profile_manager.h"
-#include "chrome/browser/remoting/firewall_traversal_observer.h"
#include "chrome/browser/renderer_host/web_cache_manager.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/browser/search_engines/template_url_prepopulate_data.h"
@@ -175,7 +174,6 @@ void RegisterUserPrefs(PrefService* user_prefs) {
InstantController::RegisterUserPrefs(user_prefs);
NetPrefObserver::RegisterPrefs(user_prefs);
ProtocolHandlerRegistry::RegisterPrefs(user_prefs);
- FirewallTraversalObserver::RegisterUserPrefs(user_prefs);
#if defined(OS_MACOSX)
PresentationModePrefs::RegisterUserPrefs(user_prefs);
#endif
diff --git a/chrome/browser/remoting/firewall_traversal_observer.cc b/chrome/browser/remoting/firewall_traversal_observer.cc
deleted file mode 100644
index ebdf850..0000000
--- a/chrome/browser/remoting/firewall_traversal_observer.cc
+++ /dev/null
@@ -1,98 +0,0 @@
-// Copyright (c) 2011 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/remoting/firewall_traversal_observer.h"
-
-#include "base/stringprintf.h"
-#include "base/json/json_writer.h"
-#include "base/values.h"
-#include "chrome/browser/prefs/pref_service.h"
-#include "chrome/browser/profiles/profile.h"
-#include "chrome/common/chrome_notification_types.h"
-#include "chrome/common/pref_names.h"
-#include "content/browser/renderer_host/render_view_host.h"
-#include "content/public/browser/notification_details.h"
-#include "content/public/browser/notification_source.h"
-#include "content/common/view_messages.h"
-#include "ipc/ipc_message_macros.h"
-
-FirewallTraversalObserver::FirewallTraversalObserver(
- TabContents* tab_contents)
- : TabContentsObserver(tab_contents) {
- // Register for notifications about all interested prefs change.
- Profile* profile =
- Profile::FromBrowserContext(tab_contents->browser_context());
- PrefService* prefs = profile->GetPrefs();
- pref_change_registrar_.Init(prefs);
- if (prefs) {
- pref_change_registrar_.Add(prefs::kRemoteAccessClientFirewallTraversal,
- this);
- // kRemoteAccessHostFirewallTraversal intentionally not added because
- // the host plugin is going to track it itself.
- }
-}
-
-FirewallTraversalObserver::~FirewallTraversalObserver() {
- // We don't want any notifications while we're running our destructor.
- pref_change_registrar_.RemoveAll();
-}
-
-// static
-void FirewallTraversalObserver::RegisterUserPrefs(PrefService* prefs) {
- prefs->RegisterBooleanPref(prefs::kRemoteAccessClientFirewallTraversal,
- true,
- PrefService::UNSYNCABLE_PREF);
- prefs->RegisterBooleanPref(prefs::kRemoteAccessHostFirewallTraversal,
- true,
- PrefService::UNSYNCABLE_PREF);
-}
-
-void FirewallTraversalObserver::Observe(
- int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- switch (type) {
- case chrome::NOTIFICATION_PREF_CHANGED: {
- std::string* pref_name_in = content::Details<std::string>(details).ptr();
- Profile* profile =
- Profile::FromBrowserContext(tab_contents()->browser_context());
- DCHECK(content::Source<PrefService>(source).ptr() == profile->GetPrefs());
- if (*pref_name_in == prefs::kRemoteAccessClientFirewallTraversal) {
- UpdateFirewallTraversalState();
- } else {
- NOTREACHED() << "unexpected pref change notification" << *pref_name_in;
- }
- break;
- }
- default:
- NOTREACHED();
- }
-}
-
-void FirewallTraversalObserver::UpdateFirewallTraversalState() {
- const char* pref_name = prefs::kRemoteAccessClientFirewallTraversal;
- Profile* profile =
- Profile::FromBrowserContext(tab_contents()->browser_context());
- bool enabled = profile->GetPrefs()->GetBoolean(pref_name);
-
- DictionaryValue value;
- value.SetBoolean(pref_name, enabled);
- std::string policy;
- base::JSONWriter::Write(&value, false, &policy);
- Send(new ViewMsg_UpdateRemoteAccessClientFirewallTraversal(routing_id(),
- policy));
-}
-
-bool FirewallTraversalObserver::OnMessageReceived(const IPC::Message& msg) {
- bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(FirewallTraversalObserver, msg)
- IPC_MESSAGE_HANDLER(ViewHostMsg_RequestRemoteAccessClientFirewallTraversal,
- UpdateFirewallTraversalState)
-
- // Have the super handle all other messages.
- IPC_MESSAGE_UNHANDLED(handled = false)
- IPC_END_MESSAGE_MAP()
-
- return handled;
-}
diff --git a/chrome/browser/remoting/firewall_traversal_observer.h b/chrome/browser/remoting/firewall_traversal_observer.h
deleted file mode 100644
index 9cb5bba..0000000
--- a/chrome/browser/remoting/firewall_traversal_observer.h
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2011 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_REMOTING_FIREWALL_TRAVERSAL_OBSERVER_H_
-#define CHROME_BROWSER_REMOTING_FIREWALL_TRAVERSAL_OBSERVER_H_
-#pragma once
-
-#include "chrome/browser/prefs/pref_change_registrar.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
-#include "content/public/browser/notification_observer.h"
-#include "ipc/ipc_channel.h"
-
-// Per-tab class to manage the firewall traversal policies for
-// the remoting plugin.
-// TODO(dmaclach): Replace this with a more generic mechanism for
-// plugins to access preferences. http://crbug.com/90543
-class FirewallTraversalObserver : public content::NotificationObserver,
- public TabContentsObserver {
- public:
- explicit FirewallTraversalObserver(TabContents* tab_contents);
- virtual ~FirewallTraversalObserver();
-
- static void RegisterUserPrefs(PrefService* prefs);
-
- // content::NotificationObserver overrides:
- virtual void Observe(int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) OVERRIDE;
-
- // IPC::Channel::Listener overrides:
- virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
-
- private:
- void UpdateFirewallTraversalState();
-
- // Registers and unregisters us for notifications.
- PrefChangeRegistrar pref_change_registrar_;
-
- DISALLOW_COPY_AND_ASSIGN(FirewallTraversalObserver);
-};
-
-#endif // CHROME_BROWSER_REMOTING_FIREWALL_TRAVERSAL_OBSERVER_H_
diff --git a/chrome/browser/remoting/firewall_traversal_observer_unittest.cc b/chrome/browser/remoting/firewall_traversal_observer_unittest.cc
deleted file mode 100644
index 0b4103b..0000000
--- a/chrome/browser/remoting/firewall_traversal_observer_unittest.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2011 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/remoting/firewall_traversal_observer.h"
-
-#include "chrome/browser/prefs/pref_service.h"
-#include "content/browser/renderer_host/mock_render_process_host.h"
-#include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h"
-#include "chrome/common/chrome_notification_types.h"
-#include "chrome/common/pref_names.h"
-#include "chrome/test/base/testing_profile.h"
-#include "content/browser/browser_thread.h"
-#include "content/browser/tab_contents/test_tab_contents.h"
-#include "content/common/view_messages.h"
-#include "ipc/ipc_message.h"
-
-class FirewallTraversalTabHelperTest : public TabContentsWrapperTestHarness {
- public:
- FirewallTraversalTabHelperTest()
- : browser_thread_(BrowserThread::UI, &message_loop_) {}
- virtual ~FirewallTraversalTabHelperTest() {}
-
- private:
- BrowserThread browser_thread_;
-};
-
-// Test receiving message.
-TEST_F(FirewallTraversalTabHelperTest, TestBasicMessage) {
- IPC::TestSink& sink = process()->sink();
- sink.ClearMessages();
- IPC::Message msg(MSG_ROUTING_NONE,
- ViewHostMsg_RequestRemoteAccessClientFirewallTraversal::ID,
- IPC::Message::PRIORITY_NORMAL);
- ASSERT_TRUE(active_rvh()->TestOnMessageReceived(msg));
- const IPC::Message* expect_msg = sink.GetUniqueMessageMatching(
- ViewMsg_UpdateRemoteAccessClientFirewallTraversal::ID);
- ASSERT_TRUE(expect_msg);
-}
-
-// Test changing preference.
-TEST_F(FirewallTraversalTabHelperTest, TestPrefChange) {
- IPC::TestSink& sink = process()->sink();
- sink.ClearMessages();
- contents_wrapper()->profile()->GetPrefs()->SetBoolean(
- prefs::kRemoteAccessClientFirewallTraversal,
- false);
- const IPC::Message* expect_msg = sink.GetUniqueMessageMatching(
- ViewMsg_UpdateRemoteAccessClientFirewallTraversal::ID);
- ASSERT_TRUE(expect_msg);
-}
diff --git a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
index a862aa4..de074c1 100644
--- a/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
+++ b/chrome/browser/ui/tab_contents/tab_contents_wrapper.cc
@@ -30,7 +30,6 @@
#include "chrome/browser/prerender/prerender_tab_helper.h"
#include "chrome/browser/printing/print_preview_message_handler.h"
#include "chrome/browser/printing/print_view_manager.h"
-#include "chrome/browser/remoting/firewall_traversal_observer.h"
#include "chrome/browser/renderer_host/web_cache_manager.h"
#include "chrome/browser/renderer_preferences_util.h"
#include "chrome/browser/sessions/restore_tab_helper.h"
@@ -282,7 +281,6 @@ TabContentsWrapper::TabContentsWrapper(TabContents* contents)
webnavigation_observer_.reset(
new ExtensionWebNavigationTabObserver(contents));
external_protocol_observer_.reset(new ExternalProtocolObserver(contents));
- firewall_traversal_observer_.reset(new FirewallTraversalObserver(contents));
plugin_observer_.reset(new PluginObserver(this));
print_preview_.reset(new printing::PrintPreviewMessageHandler(contents));
// Start the in-browser thumbnailing if the feature is enabled.
diff --git a/chrome/browser/ui/tab_contents/tab_contents_wrapper.h b/chrome/browser/ui/tab_contents/tab_contents_wrapper.h
index ca519de..d5c935b 100644
--- a/chrome/browser/ui/tab_contents/tab_contents_wrapper.h
+++ b/chrome/browser/ui/tab_contents/tab_contents_wrapper.h
@@ -32,7 +32,6 @@ class ExternalProtocolObserver;
class FaviconTabHelper;
class FileSelectObserver;
class FindTabHelper;
-class FirewallTraversalObserver;
class InfoBarTabHelper;
class HistoryTabHelper;
class NavigationController;
@@ -320,7 +319,6 @@ class TabContentsWrapper : public TabContentsObserver,
scoped_ptr<DownloadRequestLimiterObserver> download_request_limiter_observer_;
scoped_ptr<ExtensionWebNavigationTabObserver> webnavigation_observer_;
scoped_ptr<ExternalProtocolObserver> external_protocol_observer_;
- scoped_ptr<FirewallTraversalObserver> firewall_traversal_observer_;
scoped_ptr<PluginObserver> plugin_observer_;
scoped_ptr<printing::PrintPreviewMessageHandler> print_preview_;
scoped_ptr<ThumbnailGenerator> thumbnail_generation_observer_;
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index 0f2bff4..f9f9acb 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -1966,8 +1966,6 @@
'browser/protector/settings_change_global_error.cc',
'browser/protector/settings_change_global_error.h',
'browser/remove_rows_table_model.h',
- 'browser/remoting/firewall_traversal_observer.cc',
- 'browser/remoting/firewall_traversal_observer.h',
'browser/renderer_host/chrome_render_message_filter.cc',
'browser/renderer_host/chrome_render_message_filter.h',
'browser/renderer_host/chrome_render_view_host_observer.cc',
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index a504f72..adab58a 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -1478,7 +1478,6 @@
'browser/profiles/profile_dependency_manager_unittest.cc',
'browser/profiles/profile_info_cache_unittest.cc',
'browser/profiles/profile_manager_unittest.cc',
- 'browser/remoting/firewall_traversal_observer_unittest.cc',
'browser/renderer_host/web_cache_manager_unittest.cc',
'browser/resources_util_unittest.cc',
'browser/rlz/rlz_unittest.cc',
diff --git a/chrome/common/pref_names.cc b/chrome/common/pref_names.cc
index ae07301..0e9dfe4 100644
--- a/chrome/common/pref_names.cc
+++ b/chrome/common/pref_names.cc
@@ -1448,8 +1448,6 @@ const char kLoginDatabaseMigrated[] = "login_database.migrated";
// Boolean that indicates whether to allow firewall traversal while trying to
// establish the initial connection from the client or host.
-const char kRemoteAccessClientFirewallTraversal[] =
- "remote_access.client_firewall_traversal";
const char kRemoteAccessHostFirewallTraversal[] =
"remote_access.host_firewall_traversal";
diff --git a/chrome/common/pref_names.h b/chrome/common/pref_names.h
index 0b28aa7..12da82a 100644
--- a/chrome/common/pref_names.h
+++ b/chrome/common/pref_names.h
@@ -526,7 +526,6 @@ extern const char kGeolocationContentSettings[];
extern const char kLoginDatabaseMigrated[];
-extern const char kRemoteAccessClientFirewallTraversal[];
extern const char kRemoteAccessHostFirewallTraversal[];
extern const char kCloudPrintServiceURL[];
diff --git a/chrome/test/functional/policy_prefs_ui.py b/chrome/test/functional/policy_prefs_ui.py
index 82cc51d..5eaebfb 100644
--- a/chrome/test/functional/policy_prefs_ui.py
+++ b/chrome/test/functional/policy_prefs_ui.py
@@ -84,7 +84,6 @@ class PolicyPrefsUITest(pyauto.PyUITest):
'IncognitoEnabled': (False, []),
'IncognitoModeAvailability': (1, []),
'SavingBrowserHistoryDisabled': (True, []),
- 'RemoteAccessClientFirewallTraversal': (True, []),
'RemoteAccessHostFirewallTraversal': (True, []),
'PrintingEnabled': (False, []),
# Note: supported_on is empty for this policy.
diff --git a/chrome/test/ui/ppapi_uitest.cc b/chrome/test/ui/ppapi_uitest.cc
index a63256f..9d7ac01 100644
--- a/chrome/test/ui/ppapi_uitest.cc
+++ b/chrome/test/ui/ppapi_uitest.cc
@@ -232,9 +232,6 @@ TEST_PPAPI_OUT_OF_PROCESS(PostMessage)
TEST_PPAPI_IN_PROCESS(Memory)
TEST_PPAPI_OUT_OF_PROCESS(Memory)
-TEST_PPAPI_IN_PROCESS(QueryPolicy)
-//TEST_PPAPI_OUT_OF_PROCESS(QueryPolicy)
-
TEST_PPAPI_IN_PROCESS(VideoDecoder)
TEST_PPAPI_OUT_OF_PROCESS(VideoDecoder)
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
index 8629fca..c73c1a7 100644
--- a/content/common/view_messages.h
+++ b/content/common/view_messages.h
@@ -1186,13 +1186,6 @@ IPC_MESSAGE_ROUTED3(ViewMsg_GetSerializedHtmlDataForCurrentPageWithLocalLinks,
std::vector<FilePath> /* paths of local copy */,
FilePath /* local directory path */)
-// Sends updated information about the client firewall traversal policy.
-// |traversal_data| is a json string containing policy information.
-// Sent due to a policy change or in response to a
-// ViewHostMsg_RequestRemoteAccessClientFirewallTraversal message.
-IPC_MESSAGE_ROUTED1(ViewMsg_UpdateRemoteAccessClientFirewallTraversal,
- std::string /* traversal_data */)
-
// Tells the render side that a ViewHostMsg_LockMouse message has been
// processed. |succeeded| indicates whether the mouse has been successfully
// locked or not.
@@ -1943,11 +1936,6 @@ IPC_MESSAGE_ROUTED3(ViewHostMsg_SendSerializedHtmlData,
std::string /* data buffer */,
int32 /* complete status */)
-// Request updated information about the client firewall traversal policy.
-// Will result in a ViewMsg_UpdateRemoteAccessClientFirewallTraversal message
-// being sent back.
-IPC_MESSAGE_ROUTED0(ViewHostMsg_RequestRemoteAccessClientFirewallTraversal)
-
// Notifies the browser of an event occurring in the media pipeline.
IPC_MESSAGE_CONTROL1(ViewHostMsg_MediaLogEvent,
media::MediaLogEvent /* event */)
diff --git a/content/renderer/pepper_plugin_delegate_impl.cc b/content/renderer/pepper_plugin_delegate_impl.cc
index 9206bcc..15c5398 100644
--- a/content/renderer/pepper_plugin_delegate_impl.cc
+++ b/content/renderer/pepper_plugin_delegate_impl.cc
@@ -956,7 +956,6 @@ bool PepperPluginDelegateImpl::CanComposeInline() const {
void PepperPluginDelegateImpl::PluginCrashed(
webkit::ppapi::PluginInstance* instance) {
- subscribed_to_policy_updates_.erase(instance);
render_view_->PluginCrashed(instance->module()->path());
UnlockMouse(instance);
@@ -973,7 +972,6 @@ void PepperPluginDelegateImpl::InstanceCreated(
void PepperPluginDelegateImpl::InstanceDeleted(
webkit::ppapi::PluginInstance* instance) {
active_instances_.erase(instance);
- subscribed_to_policy_updates_.erase(instance);
if (mouse_lock_owner_ && mouse_lock_owner_ == instance) {
// UnlockMouse() will determine whether a ViewHostMsg_UnlockMouse needs to
@@ -1279,13 +1277,6 @@ bool PepperPluginDelegateImpl::ReadDirectory(
return file_system_dispatcher->ReadDirectory(directory_path, dispatcher);
}
-void PepperPluginDelegateImpl::PublishPolicy(const std::string& policy_json) {
- for (std::set<webkit::ppapi::PluginInstance*>::iterator i =
- subscribed_to_policy_updates_.begin();
- i != subscribed_to_policy_updates_.end(); ++i)
- (*i)->HandlePolicyUpdate(policy_json);
-}
-
void PepperPluginDelegateImpl::QueryAvailableSpace(
const GURL& origin, quota::StorageType type,
const AvailableSpaceCallback& callback) {
@@ -1588,15 +1579,6 @@ void PepperPluginDelegateImpl::ZoomLimitsChanged(double minimum_factor,
render_view_->webview()->zoomLimitsChanged(minimum_level, maximum_level);
}
-void PepperPluginDelegateImpl::SubscribeToPolicyUpdates(
- webkit::ppapi::PluginInstance* instance) {
- subscribed_to_policy_updates_.insert(instance);
-
- // TODO(ajwong): Make this only send an update to the current instance,
- // and not all subscribed plugin instances.
- render_view_->RequestRemoteAccessClientFirewallTraversal();
-}
-
std::string PepperPluginDelegateImpl::ResolveProxy(const GURL& url) {
bool result;
std::string proxy_result;
@@ -1756,9 +1738,3 @@ PepperPluginDelegateImpl::GetParentContextForPlatformContext3D() {
return NULL;
return parent_context;
}
-
-void PepperPluginDelegateImpl::PublishInitialPolicy(
- scoped_refptr<webkit::ppapi::PluginInstance> instance,
- const std::string& policy) {
- instance->HandlePolicyUpdate(policy);
-}
diff --git a/content/renderer/pepper_plugin_delegate_impl.h b/content/renderer/pepper_plugin_delegate_impl.h
index 84ec4b7..9380ec7 100644
--- a/content/renderer/pepper_plugin_delegate_impl.h
+++ b/content/renderer/pepper_plugin_delegate_impl.h
@@ -262,7 +262,6 @@ class PepperPluginDelegateImpl
virtual bool ReadDirectory(
const GURL& directory_path,
fileapi::FileSystemCallbackDispatcher* dispatcher) OVERRIDE;
- virtual void PublishPolicy(const std::string& policy_json) OVERRIDE;
virtual void QueryAvailableSpace(
const GURL& origin,
quota::StorageType type,
@@ -324,8 +323,6 @@ class PepperPluginDelegateImpl
virtual std::string GetDefaultEncoding() OVERRIDE;
virtual void ZoomLimitsChanged(double minimum_factor, double maximum_factor)
OVERRIDE;
- virtual void SubscribeToPolicyUpdates(
- webkit::ppapi::PluginInstance* instance) OVERRIDE;
virtual std::string ResolveProxy(const GURL& url) OVERRIDE;
virtual void DidStartLoading() OVERRIDE;
virtual void DidStopLoading() OVERRIDE;
@@ -348,10 +345,6 @@ class PepperPluginDelegateImpl
CONTENT_EXPORT int GetRoutingId() const;
private:
- void PublishInitialPolicy(
- scoped_refptr<webkit::ppapi::PluginInstance> instance,
- const std::string& policy);
-
// Asynchronously attempts to create a PPAPI broker for the given plugin.
scoped_refptr<PpapiBrokerImpl> CreatePpapiBroker(
webkit::ppapi::PluginModule* plugin_module);
@@ -390,10 +383,6 @@ class PepperPluginDelegateImpl
// progress.
string16 composition_text_;
- // Set of instances to receive a notification when the enterprise policy has
- // been updated.
- std::set<webkit::ppapi::PluginInstance*> subscribed_to_policy_updates_;
-
// |mouse_lock_owner_| is not owned by this class. We can know about when it
// is destroyed via InstanceDeleted().
// |mouse_lock_owner_| being non-NULL doesn't indicate that currently the
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index b71be63..1c332a4 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -664,8 +664,6 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
#if defined(OS_MACOSX)
IPC_MESSAGE_HANDLER(ViewMsg_SetInLiveResize, OnSetInLiveResize)
#endif
- IPC_MESSAGE_HANDLER(ViewMsg_UpdateRemoteAccessClientFirewallTraversal,
- OnUpdateRemoteAccessClientFirewallTraversal)
IPC_MESSAGE_HANDLER(ViewMsg_SetHistoryLengthAndPrune,
OnSetHistoryLengthAndPrune)
IPC_MESSAGE_HANDLER(ViewMsg_EnableViewSourceMode, OnEnableViewSourceMode)
@@ -3688,11 +3686,6 @@ void RenderViewImpl::OnUpdateWebPreferences(const WebPreferences& prefs) {
webkit_preferences_.Apply(webview());
}
-void RenderViewImpl::OnUpdateRemoteAccessClientFirewallTraversal(
- const std::string& policy) {
- pepper_delegate_.PublishPolicy(policy);
-}
-
void RenderViewImpl::OnSetAltErrorPageURL(const GURL& url) {
alternate_error_page_url_ = url;
}
@@ -4217,10 +4210,6 @@ void RenderViewImpl::PpapiPluginCancelComposition() {
Send(new ViewHostMsg_ImeCompositionRangeChanged(routing_id(), range));
}
-void RenderViewImpl::RequestRemoteAccessClientFirewallTraversal() {
- Send(new ViewHostMsg_RequestRemoteAccessClientFirewallTraversal(routing_id_));
-}
-
void RenderViewImpl::OnImeSetComposition(
const string16& text,
const std::vector<WebKit::WebCompositionUnderline>& underlines,
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
index da6cd9b..09bdda0 100644
--- a/content/renderer/render_view_impl.h
+++ b/content/renderer/render_view_impl.h
@@ -258,9 +258,6 @@ class RenderViewImpl : public RenderWidget,
// Cancels current composition.
void PpapiPluginCancelComposition();
- // Request updated policy regarding firewall NAT traversal being enabled.
- void RequestRemoteAccessClientFirewallTraversal();
-
#if defined(OS_MACOSX) || defined(OS_WIN)
// Informs the render view that the given plugin has gained or lost focus.
void PluginFocusChanged(bool focused, int plugin_id);
@@ -856,7 +853,6 @@ class RenderViewImpl : public RenderWidget,
void OnUndo();
void OnUpdateTargetURLAck();
void OnUpdateWebPreferences(const WebPreferences& prefs);
- void OnUpdateRemoteAccessClientFirewallTraversal(const std::string& policy);
#if defined(OS_MACOSX)
void OnWindowFrameChanged(const gfx::Rect& window_frame,
diff --git a/ppapi/api/dev/ppb_query_policy_dev.idl b/ppapi/api/dev/ppb_query_policy_dev.idl
deleted file mode 100644
index 5d6bdf2..0000000
--- a/ppapi/api/dev/ppb_query_policy_dev.idl
+++ /dev/null
@@ -1,26 +0,0 @@
-/* Copyright (c) 2011 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.
- */
-
-/**
- * This file defines the <code>PPB_QueryPolicy_Dev</code> interface.
- */
-label Chrome {
- M14 = 0.1
-};
-
-interface PPB_QueryPolicy_Dev {
- /**
- * Subscribes the instance to receive updates via the
- * <code>PPP_PolicyUpdate_Dev</code> interface.
- *
- * The plugin is guaranteed to get one update immediately via the
- * <code>PP_PolicyUpdate_Dev</code> interface. This allows the plugin to
- * retrieve the current policy when subscribing for the first time.
- *
- * @param[in] instance A <code>PP_Instance</code> indentifying one instance
- * of a module.
- */
- void SubscribeToPolicyUpdates([in] PP_Instance instance);
-};
diff --git a/ppapi/api/dev/ppp_policy_update_dev.idl b/ppapi/api/dev/ppp_policy_update_dev.idl
deleted file mode 100644
index f2f7512..0000000
--- a/ppapi/api/dev/ppp_policy_update_dev.idl
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Copyright (c) 2011 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.
- */
-
-/**
- * This file defines the <code>PPP_PolicyUpdate_Dev</code> interface.
- */
-
-label Chrome {
- M14 = 0.1
-};
-
-interface PPP_PolicyUpdate_Dev {
- /**
- * Signals that the policy has been updated, and provides it via a JSON
- * string.
- *
- * @param[in] instance A <code>PP_Instance</code> indentifying one instance
- * of a module.
- * @param[in] A <code>PP_Var</code> with a JSON string representing the
- * encoded policy.
- */
- void PolicyUpdated(
- [in] PP_Instance instance,
- [in] PP_Var policy_json);
-};
diff --git a/ppapi/c/dev/ppb_query_policy_dev.h b/ppapi/c/dev/ppb_query_policy_dev.h
deleted file mode 100644
index 46394aa..0000000
--- a/ppapi/c/dev/ppb_query_policy_dev.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Copyright (c) 2011 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.
- */
-
-/* From dev/ppb_query_policy_dev.idl modified Tue Oct 4 08:47:29 2011. */
-
-#ifndef PPAPI_C_DEV_PPB_QUERY_POLICY_DEV_H_
-#define PPAPI_C_DEV_PPB_QUERY_POLICY_DEV_H_
-
-#include "ppapi/c/pp_instance.h"
-#include "ppapi/c/pp_macros.h"
-#include "ppapi/c/pp_stdint.h"
-
-#define PPB_QUERYPOLICY_DEV_INTERFACE_0_1 "PPB_QueryPolicy(Dev);0.1"
-#define PPB_QUERYPOLICY_DEV_INTERFACE PPB_QUERYPOLICY_DEV_INTERFACE_0_1
-
-/**
- * @file
- * This file defines the <code>PPB_QueryPolicy_Dev</code> interface.
- */
-
-
-/**
- * @addtogroup Interfaces
- * @{
- */
-struct PPB_QueryPolicy_Dev {
- /**
- * Subscribes the instance to receive updates via the
- * <code>PPP_PolicyUpdate_Dev</code> interface.
- *
- * The plugin is guaranteed to get one update immediately via the
- * <code>PP_PolicyUpdate_Dev</code> interface. This allows the plugin to
- * retrieve the current policy when subscribing for the first time.
- *
- * @param[in] instance A <code>PP_Instance</code> indentifying one instance
- * of a module.
- */
- void (*SubscribeToPolicyUpdates)(PP_Instance instance);
-};
-/**
- * @}
- */
-
-#endif /* PPAPI_C_DEV_PPB_QUERY_POLICY_DEV_H_ */
-
diff --git a/ppapi/c/dev/ppp_policy_update_dev.h b/ppapi/c/dev/ppp_policy_update_dev.h
deleted file mode 100644
index 83fa9b3..0000000
--- a/ppapi/c/dev/ppp_policy_update_dev.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* Copyright (c) 2011 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.
- */
-
-/* From dev/ppp_policy_update_dev.idl modified Tue Oct 4 09:58:59 2011. */
-
-#ifndef PPAPI_C_DEV_PPP_POLICY_UPDATE_DEV_H_
-#define PPAPI_C_DEV_PPP_POLICY_UPDATE_DEV_H_
-
-#include "ppapi/c/pp_bool.h"
-#include "ppapi/c/pp_instance.h"
-#include "ppapi/c/pp_macros.h"
-#include "ppapi/c/pp_stdint.h"
-#include "ppapi/c/pp_var.h"
-
-#define PPP_POLICYUPDATE_DEV_INTERFACE_0_1 "PPP_PolicyUpdate(Dev);0.1"
-#define PPP_POLICYUPDATE_DEV_INTERFACE PPP_POLICYUPDATE_DEV_INTERFACE_0_1
-
-/**
- * @file
- * This file defines the <code>PPP_PolicyUpdate_Dev</code> interface.
- */
-
-
-/**
- * @addtogroup Interfaces
- * @{
- */
-struct PPP_PolicyUpdate_Dev {
- /**
- * Signals that the policy has been updated, and provides it via a JSON
- * string.
- *
- * @param[in] instance A <code>PP_Instance</code> indentifying one instance
- * of a module.
- * @param[in] A <code>PP_Var</code> with a JSON string representing the
- * encoded policy.
- */
- void (*PolicyUpdated)(PP_Instance instance, struct PP_Var policy_json);
-};
-/**
- * @}
- */
-
-#endif /* PPAPI_C_DEV_PPP_POLICY_UPDATE_DEV_H_ */
-
diff --git a/ppapi/ppapi_cpp.gypi b/ppapi/ppapi_cpp.gypi
index 48378f7..923e890 100644
--- a/ppapi/ppapi_cpp.gypi
+++ b/ppapi/ppapi_cpp.gypi
@@ -72,7 +72,6 @@
'c/dev/ppb_fullscreen_dev.h',
'c/dev/ppb_ime_input_event_dev.h',
'c/dev/ppb_memory_dev.h',
- 'c/dev/ppb_query_policy_dev.h',
'c/dev/ppb_scrollbar_dev.h',
'c/dev/ppb_surface_3d_dev.h',
'c/dev/ppb_testing_dev.h',
@@ -83,8 +82,6 @@
'c/dev/ppp_cursor_control_dev.h',
'c/dev/ppp_find_dev.h',
'c/dev/ppp_network_state_dev.h',
- 'c/dev/ppp_policy_update_dev.h',
- 'c/dev/ppp_printing_dev.h',
'c/dev/ppp_scrollbar_dev.h',
'c/dev/ppp_selection_dev.h',
'c/dev/ppb_text_input_dev.h',
diff --git a/ppapi/ppapi_shared.gypi b/ppapi/ppapi_shared.gypi
index 06e3e67..b6399eb 100644
--- a/ppapi/ppapi_shared.gypi
+++ b/ppapi/ppapi_shared.gypi
@@ -149,7 +149,6 @@
'thunk/ppb_messaging_thunk.cc',
'thunk/ppb_mouse_lock_thunk.cc',
'thunk/ppb_pdf_api.h',
- 'thunk/ppb_query_policy_thunk.cc',
'thunk/ppb_scrollbar_api.h',
'thunk/ppb_scrollbar_thunk.cc',
'thunk/ppb_surface_3d_api.h',
diff --git a/ppapi/ppapi_tests.gypi b/ppapi/ppapi_tests.gypi
index c7c51cf..b7999b3 100644
--- a/ppapi/ppapi_tests.gypi
+++ b/ppapi/ppapi_tests.gypi
@@ -114,8 +114,6 @@
'tests/test_paint_aggregator.h',
'tests/test_post_message.cc',
'tests/test_post_message.h',
- 'tests/test_query_policy.cc',
- 'tests/test_query_policy.h',
'tests/test_scrollbar.cc',
'tests/test_scrollbar.h',
'tests/test_struct_sizes.c',
diff --git a/ppapi/proxy/ppb_instance_proxy.cc b/ppapi/proxy/ppb_instance_proxy.cc
index 1a99b47..0d79df43 100644
--- a/ppapi/proxy/ppb_instance_proxy.cc
+++ b/ppapi/proxy/ppb_instance_proxy.cc
@@ -299,11 +299,6 @@ void PPB_Instance_Proxy::ZoomLimitsChanged(PP_Instance instance,
NOTIMPLEMENTED();
}
-void PPB_Instance_Proxy::SubscribeToPolicyUpdates(PP_Instance instance) {
- // Not proxied yet.
- NOTIMPLEMENTED();
-}
-
PP_Var PPB_Instance_Proxy::ResolveRelativeToDocument(
PP_Instance instance,
PP_Var relative,
diff --git a/ppapi/proxy/ppb_instance_proxy.h b/ppapi/proxy/ppb_instance_proxy.h
index b22b6d1..3ba34c7 100644
--- a/ppapi/proxy/ppb_instance_proxy.h
+++ b/ppapi/proxy/ppb_instance_proxy.h
@@ -78,7 +78,6 @@ class PPB_Instance_Proxy : public InterfaceProxy,
virtual void ZoomLimitsChanged(PP_Instance instance,
double minimum_factor,
double maximium_factor) OVERRIDE;
- virtual void SubscribeToPolicyUpdates(PP_Instance instance) OVERRIDE;
virtual PP_Var ResolveRelativeToDocument(
PP_Instance instance,
PP_Var relative,
diff --git a/ppapi/tests/all_c_includes.h b/ppapi/tests/all_c_includes.h
index b2e69c3..776d87a 100644
--- a/ppapi/tests/all_c_includes.h
+++ b/ppapi/tests/all_c_includes.h
@@ -26,7 +26,6 @@
#include "ppapi/c/dev/ppb_ime_input_event_dev.h"
#include "ppapi/c/dev/ppb_layer_compositor_dev.h"
#include "ppapi/c/dev/ppb_memory_dev.h"
-#include "ppapi/c/dev/ppb_query_policy_dev.h"
#include "ppapi/c/dev/ppb_scrollbar_dev.h"
#include "ppapi/c/dev/ppb_surface_3d_dev.h"
#include "ppapi/c/dev/ppb_testing_dev.h"
@@ -41,7 +40,6 @@
#include "ppapi/c/dev/ppp_class_deprecated.h"
#include "ppapi/c/dev/ppp_cursor_control_dev.h"
#include "ppapi/c/dev/ppp_find_dev.h"
-#include "ppapi/c/dev/ppp_policy_update_dev.h"
#include "ppapi/c/dev/ppp_printing_dev.h"
#include "ppapi/c/dev/ppp_scrollbar_dev.h"
#include "ppapi/c/dev/ppp_selection_dev.h"
diff --git a/ppapi/tests/test_query_policy.cc b/ppapi/tests/test_query_policy.cc
deleted file mode 100644
index 87fba20..0000000
--- a/ppapi/tests/test_query_policy.cc
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright (c) 2011 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 "ppapi/tests/test_query_policy.h"
-
-#include "ppapi/c/dev/ppb_query_policy_dev.h"
-#include "ppapi/c/dev/ppp_policy_update_dev.h"
-#include "ppapi/cpp/instance.h"
-#include "ppapi/cpp/module.h"
-#include "ppapi/cpp/var.h"
-#include "ppapi/tests/test_utils.h"
-#include "ppapi/tests/testing_instance.h"
-
-REGISTER_TEST_CASE(QueryPolicy);
-
-namespace {
-
-// Since this is a unittest, we don't care about a global string.
-std::string g_received_policy;
-
-void PolicyUpdated(PP_Instance instance, PP_Var pp_policy_json) {
- g_received_policy = pp::Var(pp::Var::DontManage(), pp_policy_json).AsString();
- GetTestingInterface()->QuitMessageLoop(instance);
-}
-
-static PPP_PolicyUpdate_Dev policy_updated_interface = {
- &PolicyUpdated,
-};
-
-} // namespace
-
-bool TestQueryPolicy::Init() {
- query_policy_interface_ = static_cast<PPB_QueryPolicy_Dev const*>(
- pp::Module::Get()->GetBrowserInterface(PPB_QUERYPOLICY_DEV_INTERFACE));
- pp::Module::Get()->AddPluginInterface(PPP_POLICYUPDATE_DEV_INTERFACE,
- &policy_updated_interface);
-
- return query_policy_interface_ && InitTestingInterface();
-}
-
-void TestQueryPolicy::RunTest() {
- RUN_TEST(SubscribeToPolicyUpdates);
-}
-
-std::string TestQueryPolicy::TestSubscribeToPolicyUpdates() {
- query_policy_interface_->SubscribeToPolicyUpdates(
- instance_->pp_instance());
-
- // Wait for a response on PPP_PolicyUpdate_Dev.
- GetTestingInterface()->RunMessageLoop(instance_->pp_instance());
-
- ASSERT_FALSE(g_received_policy.empty());
-
- PASS();
-}
diff --git a/ppapi/tests/test_query_policy.h b/ppapi/tests/test_query_policy.h
deleted file mode 100644
index 436ae19..0000000
--- a/ppapi/tests/test_query_policy.h
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright (c) 2011 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 PAPPI_TESTS_TEST_QUERY_POLICY_H_
-#define PAPPI_TESTS_TEST_QUERY_POLICY_H_
-
-#include <string>
-
-#include "ppapi/tests/test_case.h"
-
-struct PPB_QueryPolicy_Dev;
-
-class TestQueryPolicy : public TestCase {
- public:
- explicit TestQueryPolicy(TestingInstance* instance) : TestCase(instance) {}
-
- // TestCase implementation.
- virtual bool Init();
- virtual void RunTest();
-
- private:
- std::string TestGetFullPolicy();
- std::string TestSubscribeToPolicyUpdates();
-
- // Used by the tests that access the C API directly.
- const PPB_QueryPolicy_Dev* query_policy_interface_;
-};
-
-#endif // PAPPI_TESTS_TEST_BUFFER_H_
diff --git a/ppapi/thunk/interfaces_ppb_public_dev.h b/ppapi/thunk/interfaces_ppb_public_dev.h
index 93ebce9..574c954 100644
--- a/ppapi/thunk/interfaces_ppb_public_dev.h
+++ b/ppapi/thunk/interfaces_ppb_public_dev.h
@@ -41,8 +41,6 @@ PROXIED_IFACE(PPB_FileChooser, PPB_FILECHOOSER_DEV_INTERFACE_0_5,
PROXIED_IFACE(PPB_Font, PPB_FONT_DEV_INTERFACE_0_6, PPB_Font_Dev)
PROXIED_IFACE(PPB_Instance, PPB_CHAR_SET_DEV_INTERFACE_0_4, PPB_CharSet_Dev)
PROXIED_IFACE(PPB_Instance, PPB_CONSOLE_DEV_INTERFACE, PPB_Console_Dev)
-UNPROXIED_IFACE(PPB_Instance, PPB_QUERYPOLICY_DEV_INTERFACE_0_1,
- PPB_QueryPolicy_Dev)
PROXIED_IFACE(PPB_Instance, PPB_URLUTIL_DEV_INTERFACE_0_6, PPB_URLUtil_Dev)
UNPROXIED_IFACE(PPB_Instance, PPB_ZOOM_DEV_INTERFACE_0_2, PPB_Zoom_Dev)
UNPROXIED_IFACE(PPB_LayerCompositor, PPB_LAYER_COMPOSITOR_DEV_INTERFACE_0_2,
diff --git a/ppapi/thunk/ppb_instance_api.h b/ppapi/thunk/ppb_instance_api.h
index 2cbd4da..e7444d0 100644
--- a/ppapi/thunk/ppb_instance_api.h
+++ b/ppapi/thunk/ppb_instance_api.h
@@ -83,9 +83,6 @@ class PPB_Instance_FunctionAPI {
double minimum_factor,
double maximium_factor) = 0;
- // QueryPolicy.
- virtual void SubscribeToPolicyUpdates(PP_Instance instance) = 0;
-
// URLUtil.
virtual PP_Var ResolveRelativeToDocument(
PP_Instance instance,
diff --git a/ppapi/thunk/ppb_query_policy_thunk.cc b/ppapi/thunk/ppb_query_policy_thunk.cc
deleted file mode 100644
index 24ef43b..0000000
--- a/ppapi/thunk/ppb_query_policy_thunk.cc
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) 2011 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 "ppapi/c/dev/ppb_query_policy_dev.h"
-#include "ppapi/thunk/thunk.h"
-#include "ppapi/thunk/enter.h"
-#include "ppapi/thunk/ppb_instance_api.h"
-
-namespace ppapi {
-namespace thunk {
-
-namespace {
-
-void SubscribeToPolicyUpdates(PP_Instance instance) {
- EnterFunction<PPB_Instance_FunctionAPI> enter(instance, true);
- if (enter.failed())
- return;
- enter.functions()->SubscribeToPolicyUpdates(instance);
-}
-
-const PPB_QueryPolicy_Dev g_ppb_querypolicy_thunk = {
- &SubscribeToPolicyUpdates,
-};
-
-} // namespace
-
-const PPB_QueryPolicy_Dev* GetPPB_QueryPolicy_Dev_Thunk() {
- return &g_ppb_querypolicy_thunk;
-}
-
-} // namespace thunk
-} // namespace ppapi
diff --git a/ppapi/thunk/thunk.h b/ppapi/thunk/thunk.h
index bac3a63..08b6f2d 100644
--- a/ppapi/thunk/thunk.h
+++ b/ppapi/thunk/thunk.h
@@ -41,7 +41,6 @@ struct PPB_Graphics3D;
struct PPB_Graphics3DTrusted;
struct PPB_ImageDataTrusted;
struct PPB_Instance_Private;
-struct PPB_QueryPolicy_Dev;
struct PPB_URLLoaderTrusted;
typedef PPB_Instance PPB_Instance_1_0;
@@ -69,7 +68,6 @@ PPAPI_THUNK_EXPORT const PPB_Graphics3DTrusted*
GetPPB_Graphics3DTrusted_Thunk();
PPAPI_THUNK_EXPORT const PPB_ImageDataTrusted* GetPPB_ImageDataTrusted_Thunk();
PPAPI_THUNK_EXPORT const PPB_Instance_Private* GetPPB_Instance_Private_Thunk();
-PPAPI_THUNK_EXPORT const PPB_QueryPolicy_Dev* GetPPB_QueryPolicy_Thunk();
PPAPI_THUNK_EXPORT const PPB_URLLoaderTrusted* GetPPB_URLLoaderTrusted_Thunk();
} // namespace thunk
diff --git a/remoting/client/plugin/chromoting_instance.cc b/remoting/client/plugin/chromoting_instance.cc
index 7eb70a9..eec8b39 100644
--- a/remoting/client/plugin/chromoting_instance.cc
+++ b/remoting/client/plugin/chromoting_instance.cc
@@ -8,7 +8,6 @@
#include <vector>
#include "base/bind.h"
-#include "base/json/json_reader.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/stringprintf.h"
@@ -16,9 +15,7 @@
#include "base/synchronization/waitable_event.h"
#include "base/task.h"
#include "base/threading/thread.h"
-#include "base/values.h"
#include "media/base/media.h"
-#include "ppapi/c/dev/ppb_query_policy_dev.h"
#include "ppapi/cpp/completion_callback.h"
#include "ppapi/cpp/input_event.h"
#include "ppapi/cpp/rect.h"
@@ -39,17 +36,6 @@
namespace remoting {
-namespace {
-
-const char kClientFirewallTraversalPolicyName[] =
- "remote_access.client_firewall_traversal";
-
-} // namespace
-
-PPP_PolicyUpdate_Dev ChromotingInstance::kPolicyUpdatedInterface = {
- &ChromotingInstance::PolicyUpdatedThunk,
-};
-
// This flag blocks LOGs to the UI if we're already in the middle of logging
// to the UI. This prevents a potential infinite loop if we encounter an error
// while sending the log message to the UI.
@@ -68,8 +54,6 @@ ChromotingInstance::ChromotingInstance(PP_Instance pp_instance)
new PluginMessageLoopProxy(&plugin_thread_delegate_)),
context_(plugin_message_loop_),
scale_to_fit_(false),
- enable_client_nat_traversal_(false),
- initial_policy_received_(false),
thread_proxy_(new ScopedThreadProxy(plugin_message_loop_)) {
RequestInputEvents(PP_INPUTEVENT_CLASS_MOUSE | PP_INPUTEVENT_CLASS_WHEEL);
RequestFilteringInputEvents(PP_INPUTEVENT_CLASS_KEYBOARD);
@@ -129,8 +113,6 @@ bool ChromotingInstance::Init(uint32_t argc,
// Start all the threads.
context_.Start();
- SubscribeToNatTraversalPolicy();
-
// Create the chromoting objects that don't depend on the network connection.
view_.reset(new PepperView(this, &context_));
view_proxy_ = new PepperViewProxy(this, view_.get(), plugin_message_loop_);
@@ -146,20 +128,8 @@ bool ChromotingInstance::Init(uint32_t argc,
void ChromotingInstance::Connect(const ClientConfig& config) {
DCHECK(plugin_message_loop_->BelongsToCurrentThread());
- // This can only happen at initialization if the Javascript connect call
- // occurs before the enterprise policy is read. We are guaranteed that the
- // enterprise policy is pushed at least once, we we delay the connect call.
- if (!initial_policy_received_) {
- VLOG(1) << "Delaying connect until initial policy is read.";
- // base::Unretained() is safe here because |delayed_connect_| is
- // used only with |thread_proxy_|.
- delayed_connect_ = base::Bind(&ChromotingInstance::Connect,
- base::Unretained(this), config);
- return;
- }
-
host_connection_.reset(new protocol::ConnectionToHost(
- context_.network_message_loop(), this, enable_client_nat_traversal_));
+ context_.network_message_loop(), this, true));
input_handler_.reset(new PepperInputHandler(&context_,
host_connection_.get(),
@@ -456,78 +426,4 @@ void ChromotingInstance::ReleaseAllKeys() {
input_handler_->ReleaseAllKeys();
}
-// static
-void ChromotingInstance::PolicyUpdatedThunk(PP_Instance pp_instance,
- PP_Var pp_policy_json) {
- ChromotingInstance* instance = static_cast<ChromotingInstance*>(
- pp::Module::Get()->InstanceForPPInstance(pp_instance));
- std::string policy_json =
- pp::Var(pp::Var::DontManage(), pp_policy_json).AsString();
- instance->HandlePolicyUpdate(policy_json);
-}
-
-void ChromotingInstance::SubscribeToNatTraversalPolicy() {
- pp::Module::Get()->AddPluginInterface(PPP_POLICYUPDATE_DEV_INTERFACE,
- &kPolicyUpdatedInterface);
- const PPB_QueryPolicy_Dev* query_policy_interface =
- static_cast<PPB_QueryPolicy_Dev const*>(
- pp::Module::Get()->GetBrowserInterface(
- PPB_QUERYPOLICY_DEV_INTERFACE));
- query_policy_interface->SubscribeToPolicyUpdates(pp_instance());
-}
-
-bool ChromotingInstance::IsNatTraversalAllowed(
- const std::string& policy_json) {
- int error_code = base::JSONReader::JSON_NO_ERROR;
- std::string error_message;
- scoped_ptr<base::Value> policy(base::JSONReader::ReadAndReturnError(
- policy_json, true, &error_code, &error_message));
-
- if (!policy.get()) {
- LOG(ERROR) << "Error " << error_code << " parsing policy: "
- << error_message << ".";
- return false;
- }
-
- if (!policy->IsType(base::Value::TYPE_DICTIONARY)) {
- LOG(ERROR) << "Policy must be a dictionary";
- return false;
- }
-
- base::DictionaryValue* dictionary =
- static_cast<base::DictionaryValue*>(policy.get());
- bool traversal_policy = false;
- if (!dictionary->GetBoolean(kClientFirewallTraversalPolicyName,
- &traversal_policy)) {
- // Disable NAT traversal on any failure of reading the policy.
- return false;
- }
-
- return traversal_policy;
-}
-
-void ChromotingInstance::HandlePolicyUpdate(const std::string policy_json) {
- DCHECK(plugin_message_loop_->BelongsToCurrentThread());
- bool traversal_policy = IsNatTraversalAllowed(policy_json);
-
- // If the policy changes from traversal allowed, to traversal denied, we
- // need to immediately drop all connections and redo the conneciton
- // preparation.
- if (traversal_policy == false &&
- traversal_policy != enable_client_nat_traversal_) {
- if (client_.get()) {
- // This will delete the client and network related objects.
- Disconnect();
- }
- }
-
- initial_policy_received_ = true;
- enable_client_nat_traversal_ = traversal_policy;
-
- if (!delayed_connect_.is_null()) {
- thread_proxy_->PostTask(FROM_HERE, delayed_connect_);
- delayed_connect_.Reset();
- }
-}
-
} // namespace remoting
diff --git a/remoting/client/plugin/chromoting_instance.h b/remoting/client/plugin/chromoting_instance.h
index d17f371..fd3d386 100644
--- a/remoting/client/plugin/chromoting_instance.h
+++ b/remoting/client/plugin/chromoting_instance.h
@@ -12,11 +12,9 @@
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
-#include "ppapi/c/dev/ppp_policy_update_dev.h"
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_rect.h"
#include "ppapi/c/pp_resource.h"
-#include "ppapi/c/pp_var.h"
#include "ppapi/cpp/var.h"
#include "ppapi/cpp/private/instance_private.h"
#include "remoting/base/scoped_thread_proxy.h"
@@ -119,13 +117,6 @@ class ChromotingInstance : public pp::InstancePrivate {
private:
FRIEND_TEST_ALL_PREFIXES(ChromotingInstanceTest, TestCaseSetup);
- static PPP_PolicyUpdate_Dev kPolicyUpdatedInterface;
- static void PolicyUpdatedThunk(PP_Instance pp_instance,
- PP_Var pp_policy_json);
- void SubscribeToNatTraversalPolicy();
- bool IsNatTraversalAllowed(const std::string& policy_json);
- void HandlePolicyUpdate(const std::string policy_json);
-
void ProcessLogToUI(const std::string& message);
bool initialized_;
@@ -161,17 +152,7 @@ class ChromotingInstance : public pp::InstancePrivate {
// This wraps a ChromotingScriptableObject in a pp::Var.
pp::Var instance_object_;
- // Controls if this instance of the plugin should attempt to bridge
- // firewalls.
- bool enable_client_nat_traversal_;
-
- // True when the initial policy is received. Used to avoid taking
- // action before the browser has informed the plugin about its policy
- // settings.
- bool initial_policy_received_;
-
scoped_ptr<ScopedThreadProxy> thread_proxy_;
- base::Closure delayed_connect_;
DISALLOW_COPY_AND_ASSIGN(ChromotingInstance);
};
diff --git a/webkit/plugins/ppapi/mock_plugin_delegate.cc b/webkit/plugins/ppapi/mock_plugin_delegate.cc
index 060284c..2ee70c3 100644
--- a/webkit/plugins/ppapi/mock_plugin_delegate.cc
+++ b/webkit/plugins/ppapi/mock_plugin_delegate.cc
@@ -204,9 +204,6 @@ void MockPluginDelegate::SyncGetFileSystemPlatformPath(
*platform_path = FilePath();
}
-void MockPluginDelegate::PublishPolicy(const std::string& policy_json) {
-}
-
scoped_refptr<base::MessageLoopProxy>
MockPluginDelegate::GetFileThreadMessageLoopProxy() {
return scoped_refptr<base::MessageLoopProxy>();
@@ -249,9 +246,6 @@ void MockPluginDelegate::ZoomLimitsChanged(double minimum_factor,
double maximum_factor) {
}
-void MockPluginDelegate::SubscribeToPolicyUpdates(PluginInstance* instance) {
-}
-
std::string MockPluginDelegate::ResolveProxy(const GURL& url) {
return std::string();
}
diff --git a/webkit/plugins/ppapi/mock_plugin_delegate.h b/webkit/plugins/ppapi/mock_plugin_delegate.h
index 523973b..c691cdb 100644
--- a/webkit/plugins/ppapi/mock_plugin_delegate.h
+++ b/webkit/plugins/ppapi/mock_plugin_delegate.h
@@ -88,7 +88,6 @@ class MockPluginDelegate : public PluginDelegate {
DirContents* contents);
virtual void SyncGetFileSystemPlatformPath(const GURL& url,
FilePath* platform_path);
- virtual void PublishPolicy(const std::string& policy_json);
virtual scoped_refptr<base::MessageLoopProxy>
GetFileThreadMessageLoopProxy();
virtual int32_t ConnectTcp(
@@ -108,7 +107,6 @@ class MockPluginDelegate : public PluginDelegate {
virtual std::string GetDefaultEncoding();
virtual void ZoomLimitsChanged(double minimum_factor,
double maximum_factor);
- virtual void SubscribeToPolicyUpdates(PluginInstance* instance);
virtual std::string ResolveProxy(const GURL& url);
virtual void DidStartLoading();
virtual void DidStopLoading();
diff --git a/webkit/plugins/ppapi/plugin_delegate.h b/webkit/plugins/ppapi/plugin_delegate.h
index e9c0258..2a92985 100644
--- a/webkit/plugins/ppapi/plugin_delegate.h
+++ b/webkit/plugins/ppapi/plugin_delegate.h
@@ -348,12 +348,6 @@ class PluginDelegate {
const GURL& directory_path,
fileapi::FileSystemCallbackDispatcher* dispatcher) = 0;
- // Takes a UTF-8 string representing the enterprise policy, and pushes it to
- // every plugin instance that has called SubscribeToPolicyUpdates().
- //
- // This should be called when the enterprise policy is updated.
- virtual void PublishPolicy(const std::string& policy_json) = 0;
-
// For quota handlings for FileIO API.
typedef base::Callback<void (int64)> AvailableSpaceCallback;
virtual void QueryAvailableSpace(const GURL& origin,
@@ -415,10 +409,6 @@ class PluginDelegate {
virtual void ZoomLimitsChanged(double minimum_factor,
double maximum_factor) = 0;
- // Subscribes the instances to notifications that the policy has been
- // updated.
- virtual void SubscribeToPolicyUpdates(PluginInstance* instance) = 0;
-
// Retrieves the proxy information for the given URL in PAC format. On error,
// this will return an empty string.
virtual std::string ResolveProxy(const GURL& url) = 0;
diff --git a/webkit/plugins/ppapi/plugin_module.cc b/webkit/plugins/ppapi/plugin_module.cc
index f4db023..cc4350a 100644
--- a/webkit/plugins/ppapi/plugin_module.cc
+++ b/webkit/plugins/ppapi/plugin_module.cc
@@ -28,7 +28,6 @@
#include "ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h"
#include "ppapi/c/dev/ppb_layer_compositor_dev.h"
#include "ppapi/c/dev/ppb_memory_dev.h"
-#include "ppapi/c/dev/ppb_query_policy_dev.h"
#include "ppapi/c/dev/ppb_scrollbar_dev.h"
#include "ppapi/c/dev/ppb_surface_3d_dev.h"
#include "ppapi/c/dev/ppb_testing_dev.h"
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.cc b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
index 5ec687d..cee2c8d 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.cc
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.cc
@@ -18,7 +18,6 @@
#include "ppapi/c/dev/ppb_memory_dev.h"
#include "ppapi/c/dev/ppb_zoom_dev.h"
#include "ppapi/c/dev/ppp_find_dev.h"
-#include "ppapi/c/dev/ppp_policy_update_dev.h"
#include "ppapi/c/dev/ppp_selection_dev.h"
#include "ppapi/c/dev/ppp_zoom_dev.h"
#include "ppapi/c/pp_input_event.h"
@@ -285,7 +284,6 @@ PluginInstance::PluginInstance(
plugin_input_event_interface_(NULL),
plugin_private_interface_(NULL),
plugin_pdf_interface_(NULL),
- plugin_policy_updated_interface_(NULL),
plugin_selection_interface_(NULL),
plugin_zoom_interface_(NULL),
checked_for_plugin_input_event_interface_(false),
@@ -703,14 +701,6 @@ bool PluginInstance::HandleInputEvent(const WebKit::WebInputEvent& event,
return rv;
}
-void PluginInstance::HandlePolicyUpdate(const std::string& policy_json) {
- if (!LoadPolicyUpdateInterface())
- return;
- plugin_policy_updated_interface_->PolicyUpdated(
- pp_instance(),
- StringVar::StringToPPVar(module()->pp_module(), policy_json));
-}
-
void PluginInstance::HandleMessage(PP_Var message) {
TRACE_EVENT0("ppapi", "PluginInstance::HandleMessage");
// Keep a reference on the stack. See NOTE above.
@@ -983,16 +973,6 @@ bool PluginInstance::LoadPdfInterface() {
return !!plugin_pdf_interface_;
}
-bool PluginInstance::LoadPolicyUpdateInterface() {
- if (!plugin_policy_updated_interface_) {
- plugin_policy_updated_interface_ =
- static_cast<const PPP_PolicyUpdate_Dev*>(module_->GetPluginInterface(
- PPP_POLICYUPDATE_DEV_INTERFACE));
- }
-
- return !!plugin_policy_updated_interface_;
-}
-
bool PluginInstance::LoadPrintInterface() {
if (!plugin_print_interface_) {
plugin_print_interface_ = static_cast<const PPP_Printing_Dev*>(
@@ -1016,7 +996,6 @@ bool PluginInstance::LoadSelectionInterface() {
static_cast<const PPP_Selection_Dev*>(module_->GetPluginInterface(
PPP_SELECTION_DEV_INTERFACE));
}
-
return !!plugin_selection_interface_;
}
@@ -1931,10 +1910,6 @@ void PluginInstance::UnlockMouse(PP_Instance instance) {
delegate()->UnlockMouse(this);
}
-void PluginInstance::SubscribeToPolicyUpdates(PP_Instance instance) {
- delegate()->SubscribeToPolicyUpdates(this);
-}
-
PP_Var PluginInstance::ResolveRelativeToDocument(
PP_Instance instance,
PP_Var relative,
diff --git a/webkit/plugins/ppapi/ppapi_plugin_instance.h b/webkit/plugins/ppapi/ppapi_plugin_instance.h
index 73a334d..5ec97a3 100644
--- a/webkit/plugins/ppapi/ppapi_plugin_instance.h
+++ b/webkit/plugins/ppapi/ppapi_plugin_instance.h
@@ -44,7 +44,6 @@ struct PPP_Instance_Private;
struct PPP_Messaging;
struct PPP_MouseLock;
struct PPP_Pdf;
-struct PPP_PolicyUpdate_Dev;
struct PPP_Selection_Dev;
struct PPP_Zoom_Dev;
@@ -163,7 +162,6 @@ class PluginInstance : public base::RefCounted<PluginInstance>,
bool HandleDocumentLoad(PPB_URLLoader_Impl* loader);
bool HandleInputEvent(const WebKit::WebInputEvent& event,
WebKit::WebCursorInfo* cursor_info);
- void HandlePolicyUpdate(const std::string& policy_json);
PP_Var GetInstanceObject();
void ViewChanged(const gfx::Rect& position, const gfx::Rect& clip);
@@ -349,7 +347,6 @@ class PluginInstance : public base::RefCounted<PluginInstance>,
virtual int32_t LockMouse(PP_Instance instance,
PP_CompletionCallback callback) OVERRIDE;
virtual void UnlockMouse(PP_Instance instance) OVERRIDE;
- virtual void SubscribeToPolicyUpdates(PP_Instance instance) OVERRIDE;
virtual PP_Var ResolveRelativeToDocument(
PP_Instance instance,
PP_Var relative,
@@ -377,7 +374,6 @@ class PluginInstance : public base::RefCounted<PluginInstance>,
bool LoadMessagingInterface();
bool LoadMouseLockInterface();
bool LoadPdfInterface();
- bool LoadPolicyUpdateInterface();
bool LoadPrintInterface();
bool LoadPrivateInterface();
bool LoadSelectionInterface();
@@ -512,7 +508,6 @@ class PluginInstance : public base::RefCounted<PluginInstance>,
const PPP_InputEvent* plugin_input_event_interface_;
const PPP_Instance_Private* plugin_private_interface_;
const PPP_Pdf* plugin_pdf_interface_;
- const PPP_PolicyUpdate_Dev* plugin_policy_updated_interface_;
const PPP_Selection_Dev* plugin_selection_interface_;
const PPP_Zoom_Dev* plugin_zoom_interface_;