[Sync] Refactor JS event handling to reduce boilerplate

Split event handlers/routers to handle events and message replies
separately.

Reduce JS boilerplate.

Use OVERRIDE where appropriate.

BUG=
TEST=

Review URL: http://codereview.chromium.org/6930030

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84357 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/sync/test_profile_sync_service.h b/chrome/browser/sync/test_profile_sync_service.h
index d07e777..4c3e19d3 100644
--- a/chrome/browser/sync/test_profile_sync_service.h
+++ b/chrome/browser/sync/test_profile_sync_service.h
@@ -8,6 +8,7 @@
 
 #include <string>
 
+#include "base/compiler_specific.h"
 #include "chrome/browser/sync/glue/data_type_manager_impl.h"
 #include "chrome/browser/sync/js_backend.h"
 #include "chrome/browser/sync/profile_sync_service.h"
@@ -60,14 +61,14 @@
   virtual JsBackend* GetJsBackend();
 
   // JsBackend implementation.
-  virtual void SetParentJsEventRouter(JsEventRouter* router);
-  virtual void RemoveParentJsEventRouter();
-  virtual const JsEventRouter* GetParentJsEventRouter() const;
+  virtual void SetParentJsEventRouter(JsEventRouter* router) OVERRIDE;
+  virtual void RemoveParentJsEventRouter() OVERRIDE;
+  virtual const JsEventRouter* GetParentJsEventRouter() const OVERRIDE;
   // Fires an event identical to the message unless the message has
   // "delay" as a prefix, in which case a task to fire the identical
   // event is posted instead.
   virtual void ProcessMessage(const std::string& name, const JsArgList& args,
-                              const JsEventHandler* sender);
+                              const JsEventHandler* sender) OVERRIDE;
 
   virtual void StartConfiguration(Callback0::Type* callback);