diff options
author | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-10 18:19:32 +0000 |
---|---|---|
committer | wez@chromium.org <wez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-10 18:19:32 +0000 |
commit | bb76fd4253554e9e622f85aa68bbf6a092cb1481 (patch) | |
tree | 39ad412ccd8c0a9d4099e7af9847586420bc1db1 /chrome/browser/service | |
parent | 13bbbd19b7e90b1b4c3449f8945aab132eec8767 (diff) | |
download | chromium_src-bb76fd4253554e9e622f85aa68bbf6a092cb1481.zip chromium_src-bb76fd4253554e9e622f85aa68bbf6a092cb1481.tar.gz chromium_src-bb76fd4253554e9e622f85aa68bbf6a092cb1481.tar.bz2 |
Remove the Remoting Host component from Chrome.
* Update the Remoting feature flag description.
* Fix license headers.
* Remove files from gyp definitions.
* Remove Chromoting trigger for Service Process launch on browser startup, and Chromoting setup HTML resources.
* Remove Chromoting Host registration components from Browser.
* Remove resources for Chromoting Host options UI.
* Remove Service Process control APIs for Chromoting Host.
* Remove Chromoting Host prefs from Browser UI.
* Remove WebUI for Chromoting Host.
* Remove WebUI options for Chromoting Host.
* Remove Chromoting Host policy options, and don't warn if Chromoting is entirely disabled by policy, since there are no user-visible settings for it anyway.
* Remove Chromoting Host preference names, service IPCs and URL constants.
* Remove Chromoting Host from Service Process.
* Remove remoting strings, locale settings and setup "Id".
BUG=
TEST=Run Service Process from a profile in which Chromoting Host had previously been configured, and Cloud Print NOT configured. Chromoting Host should not be accessible, and Service Process should quit after about a minute.
Review URL: http://codereview.chromium.org/6955010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84819 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/service')
-rw-r--r-- | chrome/browser/service/service_process_control.cc | 51 | ||||
-rw-r--r-- | chrome/browser/service/service_process_control.h | 42 | ||||
-rw-r--r-- | chrome/browser/service/service_process_control_browsertest.cc | 8 |
3 files changed, 4 insertions, 97 deletions
diff --git a/chrome/browser/service/service_process_control.cc b/chrome/browser/service/service_process_control.cc index 135d832..0d71241 100644 --- a/chrome/browser/service/service_process_control.cc +++ b/chrome/browser/service/service_process_control.cc @@ -187,8 +187,6 @@ bool ServiceProcessControl::OnMessageReceived(const IPC::Message& message) { IPC_BEGIN_MESSAGE_MAP(ServiceProcessControl, message) IPC_MESSAGE_HANDLER(ServiceHostMsg_CloudPrintProxy_IsEnabled, OnCloudPrintProxyIsEnabled) - IPC_MESSAGE_HANDLER(ServiceHostMsg_RemotingHost_HostInfo, - OnRemotingHostInfo) IPC_MESSAGE_UNHANDLED(handled = false) IPC_END_MESSAGE_MAP() return handled; @@ -241,15 +239,6 @@ void ServiceProcessControl::OnCloudPrintProxyIsEnabled(bool enabled, } } -void ServiceProcessControl::OnRemotingHostInfo( - const remoting::ChromotingHostInfo& host_info) { - DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - for (std::set<MessageHandler*>::iterator it = message_handlers_.begin(); - it != message_handlers_.end(); ++it) { - (*it)->OnRemotingHostInfo(host_info); - } -} - bool ServiceProcessControl::GetCloudPrintProxyStatus( Callback2<bool, std::string>::Type* cloud_print_status_callback) { DCHECK(cloud_print_status_callback); @@ -263,46 +252,6 @@ bool ServiceProcessControl::Shutdown() { return ret; } -bool ServiceProcessControl::SetRemotingHostCredentials( - const std::string& user, - const std::string& talk_token) { - return Send( - new ServiceMsg_SetRemotingHostCredentials(user, talk_token)); -} - -bool ServiceProcessControl::EnableRemotingHost() { - return Send(new ServiceMsg_EnableRemotingHost()); -} - -bool ServiceProcessControl::DisableRemotingHost() { - return Send(new ServiceMsg_DisableRemotingHost()); -} - -bool ServiceProcessControl::RequestRemotingHostStatus() { - if (CheckServiceProcessReady()) { - remoting::ChromotingHostInfo failure_host_info; - failure_host_info.enabled = false; - - Launch(NewRunnableMethod(this, &ServiceProcessControl::Send, - new ServiceMsg_GetRemotingHostInfo), - NewRunnableMethod(this, - &ServiceProcessControl::OnRemotingHostInfo, - failure_host_info)); - return true; - } - return false; -} - -void ServiceProcessControl::AddMessageHandler( - MessageHandler* message_handler) { - message_handlers_.insert(message_handler); -} - -void ServiceProcessControl::RemoveMessageHandler( - MessageHandler* message_handler) { - message_handlers_.erase(message_handler); -} - DISABLE_RUNNABLE_METHOD_REFCOUNT(ServiceProcessControl); ServiceProcessControl::Launcher::Launcher(ServiceProcessControl* process, diff --git a/chrome/browser/service/service_process_control.h b/chrome/browser/service/service_process_control.h index 05914d0..7a9456b 100644 --- a/chrome/browser/service/service_process_control.h +++ b/chrome/browser/service/service_process_control.h @@ -23,10 +23,6 @@ class Profile; class CommandLine; -namespace remoting { -struct ChromotingHostInfo; -} // namespace remoting - // A ServiceProcessControl works as a portal between the service process and // the browser process. // @@ -43,18 +39,6 @@ class ServiceProcessControl : public IPC::Channel::Sender, public: typedef IDMap<ServiceProcessControl>::iterator iterator; typedef std::queue<IPC::Message> MessageQueue; - typedef Callback1<const remoting::ChromotingHostInfo&>::Type - RemotingHostStatusHandler; - - // An interface for handling messages received from the service process. - class MessageHandler { - public: - virtual ~MessageHandler() {} - - // Called when we receive reply to remoting host status request. - virtual void OnRemotingHostInfo( - const remoting::ChromotingHostInfo& host_info) = 0; - }; // Construct a ServiceProcessControl with |profile|.. explicit ServiceProcessControl(Profile* profile); @@ -95,7 +79,6 @@ class ServiceProcessControl : public IPC::Channel::Sender, // Message handlers void OnCloudPrintProxyIsEnabled(bool enabled, std::string email); - void OnRemotingHostInfo(const remoting::ChromotingHostInfo& host_info); // Send a shutdown message to the service process. IPC channel will be // destroyed after calling this method. @@ -107,28 +90,6 @@ class ServiceProcessControl : public IPC::Channel::Sender, bool GetCloudPrintProxyStatus( Callback2<bool, std::string>::Type* cloud_print_status_callback); - // Send a message to enable the remoting service in the service process. - // Return true if the message was sent. - bool SetRemotingHostCredentials(const std::string& user, - const std::string& auth_token); - - bool EnableRemotingHost(); - bool DisableRemotingHost(); - - // Send request for current status of the remoting service. - // MessageHandler::OnRemotingHostInfo() will be called when remoting host - // status is available. - bool RequestRemotingHostStatus(); - - // Add a message handler for receiving messages from the service - // process. - void AddMessageHandler(MessageHandler* message_handler); - - // Remove a message handler from the list of message handlers. Must - // not be called from a message handler (i.e. while a message is - // being processed). - void RemoveMessageHandler(MessageHandler* message_handler); - private: // This class is responsible for launching the service process on the // PROCESS_LAUNCHER thread. @@ -193,9 +154,6 @@ class ServiceProcessControl : public IPC::Channel::Sender, // the cloud print proxy. scoped_ptr<Callback2<bool, std::string>::Type> cloud_print_status_callback_; - // Handler for messages from service process. - std::set<MessageHandler*> message_handlers_; - NotificationRegistrar registrar_; }; diff --git a/chrome/browser/service/service_process_control_browsertest.cc b/chrome/browser/service/service_process_control_browsertest.cc index 673bd4c..b7b0c58 100644 --- a/chrome/browser/service/service_process_control_browsertest.cc +++ b/chrome/browser/service/service_process_control_browsertest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// 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. @@ -52,7 +52,7 @@ class ServiceProcessControlBrowserTest ui_test_utils::RunMessageLoop(); } - // Send a remoting host status request and wait reply from the service. + // Send a Cloud Print status request and wait for a reply from the service. void SendRequestAndWait() { process()->GetCloudPrintProxyStatus(NewCallback( this, &ServiceProcessControlBrowserTest::CloudPrintStatusCallback)); @@ -119,8 +119,8 @@ IN_PROC_BROWSER_TEST_F(ServiceProcessControlBrowserTest, EXPECT_TRUE(process()->Shutdown()); } -// This tests the case when a service process is launched when browser -// starts but we try to launch it again in the remoting setup dialog. +// This tests the case when a service process is launched when the browser +// starts but we try to launch it again while setting up Cloud Print. // Crashes on mac. http://crbug.com/75518 #if defined(OS_MACOSX) #define MAYBE_LaunchTwice DISABLED_LaunchTwice |