Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5032)

Unified Diff: chrome/browser/ui/webui/sync_internals_message_handler.h

Issue 224563004: sync: Re-implement getAllNodes WebUI function (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Style fixes + comments Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/sync_internals_message_handler.h
diff --git a/chrome/browser/ui/webui/sync_internals_message_handler.h b/chrome/browser/ui/webui/sync_internals_message_handler.h
index 80cc63ab04549ff52e132fdc581528aafea4baf3..1510c1be98629fdf564bf7f11e5d6bf1a02a540e 100644
--- a/chrome/browser/ui/webui/sync_internals_message_handler.h
+++ b/chrome/browser/ui/webui/sync_internals_message_handler.h
@@ -17,7 +17,6 @@
#include "content/public/browser/web_ui_message_handler.h"
#include "sync/js/js_controller.h"
#include "sync/js/js_event_handler.h"
-#include "sync/js/js_reply_handler.h"
class ProfileSyncService;
@@ -25,7 +24,6 @@ class ProfileSyncService;
class SyncInternalsMessageHandler
: public content::WebUIMessageHandler,
public syncer::JsEventHandler,
- public syncer::JsReplyHandler,
public ProfileSyncServiceObserver,
public browser_sync::ProtocolEventObserver {
public:
@@ -34,9 +32,6 @@ class SyncInternalsMessageHandler
virtual void RegisterMessages() OVERRIDE;
- // Forwards requests to the JsController.
- void ForwardToJsController(const std::string& name, const base::ListValue*);
-
// Sets up observers to receive events and forward them to the UI.
void HandleRegisterForEvents(const base::ListValue* args);
@@ -46,15 +41,18 @@ class SyncInternalsMessageHandler
// Fires and event to send the list of types back to the page.
void HandleRequestListOfTypes(const base::ListValue* args);
+ // Asynchronous request for a list of all sync nodes.
Dan Beam 2014/04/04 22:36:31 nit: // Handler for the "getAllNodes" message. Nee
rlarocque 2014/04/05 00:07:27 Done.
+ void HandleGetAllNodes(const base::ListValue* args);
+
// syncer::JsEventHandler implementation.
virtual void HandleJsEvent(
const std::string& name,
const syncer::JsEventDetails& details) OVERRIDE;
- // syncer::JsReplyHandler implementation.
- virtual void HandleJsReply(
- const std::string& name,
- const syncer::JsArgList& args) OVERRIDE;
+ // Callback used in GetAllNodes.
+ void OnReceivedAllNodes(
+ scoped_ptr<base::Value> request_id,
+ scoped_ptr<base::ListValue> nodes);
// ProfileSyncServiceObserver implementation.
virtual void OnStateChanged() OVERRIDE;
@@ -63,9 +61,6 @@ class SyncInternalsMessageHandler
virtual void OnProtocolEvent(const syncer::ProtocolEvent& e) OVERRIDE;
private:
- // Helper function to register JsController function callbacks.
- void RegisterJsControllerCallback(const std::string& name);
-
// Fetches updated aboutInfo and sends it to the page in the form of an
// onAboutInfoUpdated event.
void SendAboutInfo();

Powered by Google App Engine
This is Rietveld 408576698