Commit eaa12c7b authored by ahest's avatar ahest Committed by Commit bot

Fix crash on chrome://sync-internals when sync is disabled.

BUG=

Review URL: https://codereview.chromium.org/537893002

Cr-Commit-Position: refs/heads/master@{#293330}
parent 347e5643
......@@ -95,8 +95,8 @@ void SyncInternalsMessageHandler::HandleRegisterForPerTypeCounters(
const base::ListValue* args) {
DCHECK(args->empty());
ProfileSyncService* service = GetProfileSyncService();
if (service && !is_registered_for_counters_) {
if (ProfileSyncService* service = GetProfileSyncService()) {
if (!is_registered_for_counters_) {
service->AddTypeDebugInfoObserver(this);
is_registered_for_counters_ = true;
} else {
......@@ -104,6 +104,7 @@ void SyncInternalsMessageHandler::HandleRegisterForPerTypeCounters(
service->RemoveTypeDebugInfoObserver(this);
service->AddTypeDebugInfoObserver(this);
}
}
}
void SyncInternalsMessageHandler::HandleRequestUpdatedAboutInfo(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment