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

Issue 2729093002: Fix crash during sync load of the signin profile (Closed)

Created:
3 years, 9 months ago by emaxx
Modified:
3 years, 9 months ago
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix crash during sync load of the signin profile This fixes hitting a CHECK during restore-after-crash of the signin profile in case of enrolled device: [FATAL:device_cloud_policy_manager_chromeos.cc(252)] Check failed: signin_profile_forwarding_schema_registry_. The crash was caused by an attempt to start connection for the device cloud policy manager _before_ the schema registry of the sign-in profile is passed to it. This has regressed recently due to the change in commit afc9d60e96d31a11f756d5c56c2be54a28130960, which, in particular, made the DeviceSettingsService load much earlier than previously in case when restore-after-crash happens. The DeviceSettingsService loading triggers DeviceCloudPolicyManagerChromeOS::StartConnection(), which hits a CHECK because this all happens before the schema registry gets a chance to be passed by ProfilePolicyConnectorFactory::CreateForBrowserContextInternal(). The fix is to pass the schema registry from a different location - directly from SchemaRegistryServiceFactory::CreateForContextInternal() that constructs the schema registry. This is guaranteed by the current code to be run before the DeviceSettingsService load happens. BUG=698136 TEST=manual: induce a crash on signin screen on an enrolled device and verify that automatic restart works Review-Url: https://codereview.chromium.org/2729093002 Cr-Commit-Position: refs/heads/master@{#454627} Committed: https://chromium.googlesource.com/chromium/src/+/9bae7d67f2a11bc706b9becb3aefa2d2e0286ff0

Patch Set 1 #

Total comments: 8

Patch Set 2 : Fix nits on includes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -14 lines) Patch
M chrome/browser/policy/profile_policy_connector_factory.cc View 1 3 chunks +1 line, -14 lines 0 comments Download
M chrome/browser/policy/schema_registry_service_factory.cc View 1 2 chunks +18 lines, -0 lines 0 comments Download

Messages

Total messages: 30 (22 generated)
emaxx
Thiemo, PTAL ASAP! This bug affects all enrolled device that run ToT or a recent ...
3 years, 9 months ago (2017-03-03 05:01:38 UTC) #6
emaxx
Lutz, could you PTAL? Thiemo is OOO.
3 years, 9 months ago (2017-03-03 15:41:15 UTC) #11
emaxx
Drew, could you PTAL once you return from OOO? (Removed Lutz as he said he's ...
3 years, 9 months ago (2017-03-03 16:20:24 UTC) #16
emaxx
+Bartosz in case you will be able to review it soon (as discussed offline)
3 years, 9 months ago (2017-03-03 17:24:36 UTC) #19
bartfab (slow)
lgtm https://codereview.chromium.org/2729093002/diff/1/chrome/browser/policy/profile_policy_connector_factory.cc File chrome/browser/policy/profile_policy_connector_factory.cc (right): https://codereview.chromium.org/2729093002/diff/1/chrome/browser/policy/profile_policy_connector_factory.cc#newcode12 chrome/browser/policy/profile_policy_connector_factory.cc:12: #include "chrome/browser/browser_process.h" Nit: No longer used. https://codereview.chromium.org/2729093002/diff/1/chrome/browser/policy/profile_policy_connector_factory.cc#newcode24 chrome/browser/policy/profile_policy_connector_factory.cc:24: ...
3 years, 9 months ago (2017-03-03 17:31:28 UTC) #20
emaxx
Thanks for reviewing this quickly! And for pointing out to the missing/extra includes - as ...
3 years, 9 months ago (2017-03-03 17:42:09 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2729093002/20001
3 years, 9 months ago (2017-03-03 17:47:01 UTC) #27
commit-bot: I haz the power
3 years, 9 months ago (2017-03-03 18:25:21 UTC) #30
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/9bae7d67f2a11bc706b9becb3aef...

Powered by Google App Engine
This is Rietveld 408576698