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

Issue 337053005: Precache policy-for-extensions for device-local accounts. (Closed)

Created:
6 years, 6 months ago by Joao da Silva
Modified:
6 years, 5 months ago
CC:
chromium-reviews, extensions-reviews_chromium.org, nkostylev+watch_chromium.org, oshima+watch_chromium.org, chromium-apps-reviews_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org
Project:
chromium
Visibility:
Public.

Description

Precache policy-for-extensions for device-local accounts. This change makes the component cloud policy code start downloading policies for extensions as soon as the device-local account is loaded. That happens at the earliest during enrollment time. TBR=satorux@chromium.org BUG=224596 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=278939

Patch Set 1 #

Total comments: 16

Patch Set 2 : fixed issues with precaching #

Total comments: 1

Patch Set 3 : fixed ios tests #

Total comments: 14
Unified diffs Side-by-side diffs Delta from patch set Stats (+304 lines, -82 lines) Patch
A chrome/browser/chromeos/policy/device_local_account_extension_tracker.h View 1 1 chunk +43 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/policy/device_local_account_extension_tracker.cc View 1 1 chunk +83 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/policy/device_local_account_policy_service.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/policy/device_local_account_policy_service.cc View 1 3 chunks +5 lines, -0 lines 2 comments Download
M chrome/browser/chromeos/policy/device_local_account_policy_service_unittest.cc View 1 1 chunk +22 lines, -5 lines 4 comments Download
M chrome/browser/policy/cloud/component_cloud_policy_browsertest.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/chrome_browser_chromeos.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M chromeos/dbus/session_manager_client.cc View 1 1 chunk +1 line, -13 lines 0 comments Download
M components/policy/core/common/cloud/component_cloud_policy_service.h View 1 1 chunk +6 lines, -1 line 0 comments Download
M components/policy/core/common/cloud/component_cloud_policy_service.cc View 1 15 chunks +41 lines, -25 lines 0 comments Download
M components/policy/core/common/cloud/component_cloud_policy_service_unittest.cc View 1 13 chunks +22 lines, -14 lines 0 comments Download
M components/policy/core/common/forwarding_policy_provider_unittest.cc View 1 7 chunks +25 lines, -5 lines 2 comments Download
M components/policy/core/common/schema_map.cc View 1 1 chunk +11 lines, -1 line 0 comments Download
M components/policy/core/common/schema_map_unittest.cc View 1 2 chunks +8 lines, -8 lines 0 comments Download
M components/policy/core/common/schema_registry.cc View 1 2 chunks +4 lines, -4 lines 4 comments Download
M components/policy/core/common/schema_registry_unittest.cc View 1 2 2 chunks +24 lines, -6 lines 2 comments Download

Messages

Total messages: 11 (0 generated)
Joao da Silva
And that's the last one. PTAL, thanks!
6 years, 6 months ago (2014-06-20 15:57:24 UTC) #1
bartfab (slow)
lgtm https://codereview.chromium.org/337053005/diff/1/chrome/browser/chromeos/policy/device_local_account_extension_tracker.cc File chrome/browser/chromeos/policy/device_local_account_extension_tracker.cc (right): https://codereview.chromium.org/337053005/diff/1/chrome/browser/chromeos/policy/device_local_account_extension_tracker.cc#newcode24 chrome/browser/chromeos/policy/device_local_account_extension_tracker.cc:24: : store_(store), schema_registry_(schema_registry) { Style guide nit: Each ...
6 years, 6 months ago (2014-06-20 17:03:46 UTC) #2
Joao da Silva
This needed some more work in the end. One issue is that the ComponentCloudPolicyService expects ...
6 years, 6 months ago (2014-06-20 22:28:20 UTC) #3
Joao da Silva
+satorux for the stub session_manager_client.cc changes
6 years, 6 months ago (2014-06-20 22:28:52 UTC) #4
Joao da Silva
The CQ bit was checked by joaodasilva@chromium.org
6 years, 6 months ago (2014-06-20 23:06:00 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joaodasilva@chromium.org/337053005/20001
6 years, 6 months ago (2014-06-20 23:08:12 UTC) #6
Joao da Silva
The CQ bit was checked by joaodasilva@chromium.org
6 years, 6 months ago (2014-06-21 00:10:00 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/joaodasilva@chromium.org/337053005/40001
6 years, 6 months ago (2014-06-21 00:11:48 UTC) #8
commit-bot: I haz the power
Change committed as 278939
6 years, 6 months ago (2014-06-21 05:55:02 UTC) #9
bartfab (slow)
lgtm https://codereview.chromium.org/337053005/diff/40001/chrome/browser/chromeos/policy/device_local_account_policy_service.cc File chrome/browser/chromeos/policy/device_local_account_policy_service.cc (right): https://codereview.chromium.org/337053005/diff/40001/chrome/browser/chromeos/policy/device_local_account_policy_service.cc#newcode148 chrome/browser/chromeos/policy/device_local_account_policy_service.cc:148: PolicyNamespace(POLICY_DOMAIN_CHROME, ""), Nit: #include "components/policy/core/common/policy_namespace.h" https://codereview.chromium.org/337053005/diff/40001/chrome/browser/chromeos/policy/device_local_account_policy_service_unittest.cc File chrome/browser/chromeos/policy/device_local_account_policy_service_unittest.cc ...
6 years, 6 months ago (2014-06-23 09:53:38 UTC) #10
Joao da Silva
6 years, 5 months ago (2014-07-16 11:47:52 UTC) #11
Message was sent while issue was closed.
Bartosz, I've addressed your late comments at
https://codereview.chromium.org/392233003. See replies inline here.

https://codereview.chromium.org/337053005/diff/40001/chrome/browser/chromeos/...
File chrome/browser/chromeos/policy/device_local_account_policy_service.cc
(right):

https://codereview.chromium.org/337053005/diff/40001/chrome/browser/chromeos/...
chrome/browser/chromeos/policy/device_local_account_policy_service.cc:148:
PolicyNamespace(POLICY_DOMAIN_CHROME, ""),
On 2014/06/23 09:53:37, bartfab wrote:
> Nit: #include "components/policy/core/common/policy_namespace.h"

Done.

https://codereview.chromium.org/337053005/diff/40001/chrome/browser/chromeos/...
File
chrome/browser/chromeos/policy/device_local_account_policy_service_unittest.cc
(right):

https://codereview.chromium.org/337053005/diff/40001/chrome/browser/chromeos/...
chrome/browser/chromeos/policy/device_local_account_policy_service_unittest.cc:418:
const em::PolicyFetchRequest* public_account =
On 2014/06/23 09:53:37, bartfab wrote:
> Nit: #include "policy/proto/device_management_backend.pb.h"

Done.

https://codereview.chromium.org/337053005/diff/40001/chrome/browser/chromeos/...
chrome/browser/chromeos/policy/device_local_account_policy_service_unittest.cc:425:
const em::PolicyFetchRequest* tmp = public_account;
On 2014/06/23 09:53:37, bartfab wrote:
> Nit: Use std::swap() from <algorithm>

Done.

https://codereview.chromium.org/337053005/diff/40001/components/policy/core/c...
File components/policy/core/common/forwarding_policy_provider_unittest.cc
(right):

https://codereview.chromium.org/337053005/diff/40001/components/policy/core/c...
components/policy/core/common/forwarding_policy_provider_unittest.cc:51:
std::string error;
On 2014/06/23 09:53:37, bartfab wrote:
> Nit: #include <string>

Done.

https://codereview.chromium.org/337053005/diff/40001/components/policy/core/c...
File components/policy/core/common/schema_registry.cc (right):

https://codereview.chromium.org/337053005/diff/40001/components/policy/core/c...
components/policy/core/common/schema_registry.cc:208: // POLICY_DOMAIN_CHROME is
skipped to avoid spurious updated when a new
On 2014/06/23 09:53:38, bartfab wrote:
> Nit: s/updated/updates/

Done.

https://codereview.chromium.org/337053005/diff/40001/components/policy/core/c...
components/policy/core/common/schema_registry.cc:209: // Profile is created. If
the ForwardingSchemaRegistry is meant to be used
On 2014/06/23 09:53:38, bartfab wrote:
> Nit: s/meant to be//

Done.

https://codereview.chromium.org/337053005/diff/40001/components/policy/core/c...
File components/policy/core/common/schema_registry_unittest.cc (right):

https://codereview.chromium.org/337053005/diff/40001/components/policy/core/c...
components/policy/core/common/schema_registry_unittest.cc:290:
forwarding.SetReady(POLICY_DOMAIN_EXTENSIONS);
Good catch, it's actually not needed above.

POLICY_DOMAIN_EXTENSIONS is always ready on platforms where ENABLE_EXTENSIONS is
not defined, so that it doesn't block the initialization of the registry.

So setting it as ready on those platforms again is effectively a nop, and the
#ifdef is just adding confusion. Removed.

Powered by Google App Engine
This is Rietveld 408576698