OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_WEBUI_SYNC_INTERNALS_MESSAGE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_SYNC_INTERNALS_MESSAGE_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_SYNC_INTERNALS_MESSAGE_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_SYNC_INTERNALS_MESSAGE_HANDLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 virtual void OnProtocolEvent(const syncer::ProtocolEvent& e) OVERRIDE; | 59 virtual void OnProtocolEvent(const syncer::ProtocolEvent& e) OVERRIDE; |
60 | 60 |
61 private: | 61 private: |
62 // Fetches updated aboutInfo and sends it to the page in the form of an | 62 // Fetches updated aboutInfo and sends it to the page in the form of an |
63 // onAboutInfoUpdated event. | 63 // onAboutInfoUpdated event. |
64 void SendAboutInfo(); | 64 void SendAboutInfo(); |
65 | 65 |
66 ProfileSyncService* GetProfileSyncService(); | 66 ProfileSyncService* GetProfileSyncService(); |
67 | 67 |
68 base::WeakPtr<syncer::JsController> js_controller_; | 68 base::WeakPtr<syncer::JsController> js_controller_; |
| 69 |
| 70 // A flag used to prevent double-registration with ProfileSyncService. |
| 71 bool is_registered_; |
| 72 |
69 base::WeakPtrFactory<SyncInternalsMessageHandler> weak_ptr_factory_; | 73 base::WeakPtrFactory<SyncInternalsMessageHandler> weak_ptr_factory_; |
70 | 74 |
71 DISALLOW_COPY_AND_ASSIGN(SyncInternalsMessageHandler); | 75 DISALLOW_COPY_AND_ASSIGN(SyncInternalsMessageHandler); |
72 }; | 76 }; |
73 | 77 |
74 #endif // CHROME_BROWSER_UI_WEBUI_SYNC_INTERNALS_MESSAGE_HANDLER_H_ | 78 #endif // CHROME_BROWSER_UI_WEBUI_SYNC_INTERNALS_MESSAGE_HANDLER_H_ |
OLD | NEW |