From 102253f8f90c2182190a825ec5573081f17dc9a2 Mon Sep 17 00:00:00 2001 From: "ivankr@chromium.org" Date: Fri, 14 Dec 2012 17:00:58 +0000 Subject: Remove the protector service. BUG=165008 NOTRY=true Review URL: https://chromiumcodereview.appspot.com/11493003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@173169 0039d316-1c4b-4281-b951-d872f2087c98 --- .../automation/testing_automation_provider.cc | 57 ---------------------- .../automation/testing_automation_provider.h | 14 ------ 2 files changed, 71 deletions(-) (limited to 'chrome/browser/automation') diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc index 16e6c8b..2bcd2c4 100644 --- a/chrome/browser/automation/testing_automation_provider.cc +++ b/chrome/browser/automation/testing_automation_provider.cc @@ -80,9 +80,6 @@ #include "chrome/browser/profiles/profile.h" #include "chrome/browser/profiles/profile_info_cache.h" #include "chrome/browser/profiles/profile_manager.h" -#include "chrome/browser/protector/protector_service.h" -#include "chrome/browser/protector/protector_service_factory.h" -#include "chrome/browser/protector/protector_utils.h" #include "chrome/browser/search_engines/template_url.h" #include "chrome/browser/search_engines/template_url_service.h" #include "chrome/browser/search_engines/template_url_service_factory.h" @@ -1909,13 +1906,6 @@ void TestingAutomationProvider::BuildJSONHandlerMaps() { browser_handler_map_["PerformActionOnSearchEngine"] = &TestingAutomationProvider::PerformActionOnSearchEngine; -#if defined(ENABLE_PROTECTOR_SERVICE) - browser_handler_map_["GetProtectorState"] = - &TestingAutomationProvider::GetProtectorState; - browser_handler_map_["PerformProtectorAction"] = - &TestingAutomationProvider::PerformProtectorAction; -#endif - browser_handler_map_["SetWindowDimensions"] = &TestingAutomationProvider::SetWindowDimensions; @@ -2899,53 +2889,6 @@ void TestingAutomationProvider::PerformActionOnSearchEngine( } } -#if defined(ENABLE_PROTECTOR_SERVICE) -// Sample json output: { "enabled": true, -// "showing_change": false } -void TestingAutomationProvider::GetProtectorState( - Browser* browser, - DictionaryValue* args, - IPC::Message* reply_message) { - protector::ProtectorService* protector_service = - protector::ProtectorServiceFactory::GetForProfile(browser->profile()); - scoped_ptr return_value(new DictionaryValue); - return_value->SetBoolean("enabled", protector::IsEnabled()); - return_value->SetBoolean("showing_change", - protector_service->IsShowingChange()); - AutomationJSONReply(this, reply_message).SendSuccess(return_value.get()); -} - -// Sample json inputs: -// { "command": "PerformProtectorAction", "action": "apply_change" } -// { "command": "PerformProtectorAction", "action": "discard_change" } -void TestingAutomationProvider::PerformProtectorAction( - Browser* browser, - base::DictionaryValue* args, - IPC::Message* reply_message) { - protector::ProtectorService* protector_service = - protector::ProtectorServiceFactory::GetForProfile(browser->profile()); - AutomationJSONReply reply(this, reply_message); - if (!protector::IsEnabled()) { - reply.SendError("Protector is disabled"); - return; - } - std::string action; - if (!args->GetString("action", &action)) { - reply.SendError("Missing 'action' value"); - return; - } - protector::BaseSettingChange* change = - protector_service->GetLastChange(); - if (action == "apply_change") - protector_service->ApplyChange(change, browser); - else if (action == "discard_change") - protector_service->DiscardChange(change, browser); - else - return reply.SendError("Invalid 'action' value"); - reply.SendSuccess(NULL); -} -#endif // defined(ENABLE_PROTECTOR_SERVICE) - // Sample json input: { "command": "GetLocalStatePrefsInfo" } // Refer chrome/test/pyautolib/prefs_info.py for sample json output. void TestingAutomationProvider::GetLocalStatePrefsInfo( diff --git a/chrome/browser/automation/testing_automation_provider.h b/chrome/browser/automation/testing_automation_provider.h index 6e6e9c97..ca5340c 100644 --- a/chrome/browser/automation/testing_automation_provider.h +++ b/chrome/browser/automation/testing_automation_provider.h @@ -380,20 +380,6 @@ class TestingAutomationProvider : public AutomationProvider, base::DictionaryValue* args, IPC::Message* reply_message); -#if defined(ENABLE_PROTECTOR_SERVICE) - // Get ProtectorService state. - // Uses the JSON interface for input/output. - void GetProtectorState(Browser* browser, - base::DictionaryValue* args, - IPC::Message* reply_message); - - // Perform a given action on the ProtectorService. - // Uses the JSON interface for input/output. - void PerformProtectorAction(Browser* browser, - base::DictionaryValue* args, - IPC::Message* reply_message); -#endif - // Get info about preferences stored in Local State. // Uses the JSON interface for input/output. void GetLocalStatePrefsInfo(base::DictionaryValue* args, -- cgit v1.1