From ddcaa41d64b5edfc68b74ecada71faf3cca25b98 Mon Sep 17 00:00:00 2001 From: "nileshagrawal@chromium.org" Date: Fri, 30 Mar 2012 19:57:29 +0000 Subject: Exclude ProtectorService code from Android build. The change adds a ENABLE_PROTECTOR_SERVICE condition to exclude ProtectorService and related code. I have introduced protector_utils.h which contains methods used by keyword_table.cc to sign and verify keywords. Note: ChromeOS also excludes protector from the tests (chrome_tests.gypi), but disables ProtectorService using a command line switch. BUG=117407 TEST= Review URL: http://codereview.chromium.org/9863047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129910 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/automation/testing_automation_provider.cc | 5 +++++ chrome/browser/automation/testing_automation_provider.h | 2 ++ 2 files changed, 7 insertions(+) (limited to 'chrome/browser/automation') diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc index 36bbcd8..a7601ad 100644 --- a/chrome/browser/automation/testing_automation_provider.cc +++ b/chrome/browser/automation/testing_automation_provider.cc @@ -79,6 +79,7 @@ #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" @@ -2528,10 +2529,12 @@ void TestingAutomationProvider::SendJSONRequest(int handle, 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; @@ -3453,6 +3456,7 @@ void TestingAutomationProvider::PerformActionOnSearchEngine( } } +#if defined(ENABLE_PROTECTOR_SERVICE) // Sample json output: { "enabled": true, // "showing_change": false } void TestingAutomationProvider::GetProtectorState( @@ -3497,6 +3501,7 @@ void TestingAutomationProvider::PerformProtectorAction( 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. diff --git a/chrome/browser/automation/testing_automation_provider.h b/chrome/browser/automation/testing_automation_provider.h index cae0b8a..cdb4121 100644 --- a/chrome/browser/automation/testing_automation_provider.h +++ b/chrome/browser/automation/testing_automation_provider.h @@ -492,6 +492,7 @@ 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, @@ -503,6 +504,7 @@ class TestingAutomationProvider : public AutomationProvider, 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. -- cgit v1.1