| Index: chrome/browser/ui/webui/sync_internals_message_handler.cc
|
| diff --git a/chrome/browser/ui/webui/sync_internals_message_handler.cc b/chrome/browser/ui/webui/sync_internals_message_handler.cc
|
| index 92ff657baf0cf0914c63b2a9d859fae3d3f52640..fa21977522d44848d523aafb291e376b59c966f7 100644
|
| --- a/chrome/browser/ui/webui/sync_internals_message_handler.cc
|
| +++ b/chrome/browser/ui/webui/sync_internals_message_handler.cc
|
| @@ -95,14 +95,15 @@ void SyncInternalsMessageHandler::HandleRegisterForPerTypeCounters(
|
| const base::ListValue* args) {
|
| DCHECK(args->empty());
|
|
|
| - ProfileSyncService* service = GetProfileSyncService();
|
| - if (service && !is_registered_for_counters_) {
|
| - service->AddTypeDebugInfoObserver(this);
|
| - is_registered_for_counters_ = true;
|
| - } else {
|
| - // Re-register to ensure counters get re-emitted.
|
| - service->RemoveTypeDebugInfoObserver(this);
|
| - service->AddTypeDebugInfoObserver(this);
|
| + if (ProfileSyncService* service = GetProfileSyncService()) {
|
| + if (!is_registered_for_counters_) {
|
| + service->AddTypeDebugInfoObserver(this);
|
| + is_registered_for_counters_ = true;
|
| + } else {
|
| + // Re-register to ensure counters get re-emitted.
|
| + service->RemoveTypeDebugInfoObserver(this);
|
| + service->AddTypeDebugInfoObserver(this);
|
| + }
|
| }
|
| }
|
|
|
|
|