New issue
Advanced search Search tips

Issue 812641 link

Starred by 3 users

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 1
Type: Bug



Sign in to add a comment

Implement machine level user cloud policies

Project Member Reported by rogerta@chromium.org, Feb 15 2018

Issue description

Implement machine level user cloud policies

Design doc:
https://drive.google.com/open?id=1bLlcHrPj4MOfCasp8gWaQcGhdIygwuXmSfxc65N5DFQ
 
Project Member

Comment 2 by bugdroid1@chromium.org, Feb 22 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/81a704029695ece3d4793433b453f42c4820ca79

commit 81a704029695ece3d4793433b453f42c4820ca79
Author: Roger Tawa <rogerta@google.com>
Date: Thu Feb 22 17:07:23 2018

Add support to DeviceManagementService for token enrollment.

This CL adds calls to send and process token enrollment requests as well as
send chrome reports.  These methods are not called yet, but will be called in
subsequent changes.

BUG=812641

Change-Id: If5985a259c372b159f07a23b485963f87b12bd30
Reviewed-on: https://chromium-review.googlesource.com/922398
Commit-Queue: Roger Tawa <rogerta@chromium.org>
Reviewed-by: Drew Wilson <atwilson@chromium.org>
Reviewed-by: Maksim Ivanov <emaxx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538462}
[modify] https://crrev.com/81a704029695ece3d4793433b453f42c4820ca79/components/policy/core/common/cloud/cloud_policy_constants.cc
[modify] https://crrev.com/81a704029695ece3d4793433b453f42c4820ca79/components/policy/core/common/cloud/cloud_policy_constants.h
[modify] https://crrev.com/81a704029695ece3d4793433b453f42c4820ca79/components/policy/core/common/cloud/device_management_service.cc
[modify] https://crrev.com/81a704029695ece3d4793433b453f42c4820ca79/components/policy/core/common/cloud/device_management_service.h
[modify] https://crrev.com/81a704029695ece3d4793433b453f42c4820ca79/components/policy/core/common/cloud/device_management_service_unittest.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Feb 22 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c25af01f41ba16ec617d8495047d687f95f3b84c

commit c25af01f41ba16ec617d8495047d687f95f3b84c
Author: Roger Tawa <rogerta@google.com>
Date: Thu Feb 22 19:47:47 2018

Introduce new base class for desktop cloud policy stores.

Both desktop and ChromeOS policy stores (UserCloudPolicyStore and
UserCloudPolicyStoreChromeOS respectivele) derive from UserCloudPolicyStoreBase.
We now need to two different cloud policy stores for desktop, one tied to the
profile (ie. the existing implementation) and a new one for machine level
user cloud policies.  These two will share some implementation details which
must not be shared with ChromeOS.

This CL introduces a new store class that sits between UserCloudPolicyStore and
UserCloudPolicyStoreBase for desktop only.  The roles of the classes are:

UserCloudPolicyStoreBase: common code for desktop and ChromeOS stores.
DesktopCloudPolicyStore: common code for desktop stores.
UserCloudPolicyStore: for profile policy stores. Same behaviour as today.
MachineLevelUserCloudPolicyStore: a new class that derives from
DesktopCloudPolicyStore that will be included in a follow up CL.

Bug=812641

Change-Id: Ia96f4ba3048edcbe537a57fcbec44390d090f383
Reviewed-on: https://chromium-review.googlesource.com/922926
Commit-Queue: Roger Tawa <rogerta@chromium.org>
Reviewed-by: Drew Wilson <atwilson@chromium.org>
Reviewed-by: Sergey Poromov <poromov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538531}
[modify] https://crrev.com/c25af01f41ba16ec617d8495047d687f95f3b84c/chrome/browser/chromeos/policy/device_local_account_policy_store.cc
[modify] https://crrev.com/c25af01f41ba16ec617d8495047d687f95f3b84c/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos.cc
[modify] https://crrev.com/c25af01f41ba16ec617d8495047d687f95f3b84c/components/policy/core/common/cloud/user_cloud_policy_store.cc
[modify] https://crrev.com/c25af01f41ba16ec617d8495047d687f95f3b84c/components/policy/core/common/cloud/user_cloud_policy_store.h
[modify] https://crrev.com/c25af01f41ba16ec617d8495047d687f95f3b84c/components/policy/core/common/cloud/user_cloud_policy_store_base.cc
[modify] https://crrev.com/c25af01f41ba16ec617d8495047d687f95f3b84c/components/policy/core/common/cloud/user_cloud_policy_store_base.h
[modify] https://crrev.com/c25af01f41ba16ec617d8495047d687f95f3b84c/components/policy/tools/generate_policy_source.py

Project Member

Comment 4 by bugdroid1@chromium.org, Mar 7 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9d9a2af422ae6fb52fd47d42303bb5710863e98b

commit 9d9a2af422ae6fb52fd47d42303bb5710863e98b
Author: Owen Min <zmin@chromium.org>
Date: Wed Mar 07 21:21:32 2018

Create MachineLevelUserCloudPolicyStore

This is a new implementation of DesktopCloudPolicyStore. It has
- Different path of policy cache
  The policy files are store as
    "$user_data_dir/Policy/Machine Level User Cloud Policy" and
     "$user_data_dir/Policy/Machine Level User Cloud Policy Signing Key".
- Global dm_token and client_id
  It will load the policy cache from disk iff the global token is existed.
  And it will validate the dm_token and client_id with the global ones after
  store/load.

Bug: 812641
Change-Id: If02ad77388fc197f20dc25c04c1f852e1827253a
Reviewed-on: https://chromium-review.googlesource.com/940442
Commit-Queue: Owen Min <zmin@chromium.org>
Reviewed-by: Maksim Ivanov <emaxx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541582}
[modify] https://crrev.com/9d9a2af422ae6fb52fd47d42303bb5710863e98b/components/policy/core/common/BUILD.gn
[add] https://crrev.com/9d9a2af422ae6fb52fd47d42303bb5710863e98b/components/policy/core/common/cloud/machine_level_user_cloud_policy_store.cc
[add] https://crrev.com/9d9a2af422ae6fb52fd47d42303bb5710863e98b/components/policy/core/common/cloud/machine_level_user_cloud_policy_store.h
[add] https://crrev.com/9d9a2af422ae6fb52fd47d42303bb5710863e98b/components/policy/core/common/cloud/machine_level_user_cloud_policy_store_unittest.cc
[modify] https://crrev.com/9d9a2af422ae6fb52fd47d42303bb5710863e98b/components/policy/core/common/cloud/user_cloud_policy_store.cc
[modify] https://crrev.com/9d9a2af422ae6fb52fd47d42303bb5710863e98b/components/policy/core/common/cloud/user_cloud_policy_store.h
[modify] https://crrev.com/9d9a2af422ae6fb52fd47d42303bb5710863e98b/components/policy/core/common/cloud/user_cloud_policy_store_base.h

Comment 5 by zmin@chromium.org, Mar 7 2018

Cc: zmin@chromium.org
Project Member

Comment 6 by bugdroid1@chromium.org, Mar 19 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/86ce41878094727b18714ace919cecd32d3edd71

commit 86ce41878094727b18714ace919cecd32d3edd71
Author: Owen Min <zmin@chromium.org>
Date: Mon Mar 19 16:38:54 2018

Create MachineLevelUserCloudPolicyManager

This is a new implmentation of CloudPolicyManager.
It will initialize the policy and always try to load store immediately if
possible.

Bug: 812641
Change-Id: I0c23fdeda4093123f7859682cd43669fefe37cfd
Reviewed-on: https://chromium-review.googlesource.com/957817
Commit-Queue: Owen Min <zmin@chromium.org>
Reviewed-by: Maksim Ivanov <emaxx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544060}
[modify] https://crrev.com/86ce41878094727b18714ace919cecd32d3edd71/components/policy/core/common/BUILD.gn
[add] https://crrev.com/86ce41878094727b18714ace919cecd32d3edd71/components/policy/core/common/cloud/machine_level_user_cloud_policy_manager.cc
[add] https://crrev.com/86ce41878094727b18714ace919cecd32d3edd71/components/policy/core/common/cloud/machine_level_user_cloud_policy_manager.h
[add] https://crrev.com/86ce41878094727b18714ace919cecd32d3edd71/components/policy/core/common/cloud/machine_level_user_cloud_policy_manager_unittest.cc
[modify] https://crrev.com/86ce41878094727b18714ace919cecd32d3edd71/components/policy/core/common/cloud/machine_level_user_cloud_policy_store.cc
[modify] https://crrev.com/86ce41878094727b18714ace919cecd32d3edd71/components/policy/core/common/cloud/machine_level_user_cloud_policy_store.h
[modify] https://crrev.com/86ce41878094727b18714ace919cecd32d3edd71/components/policy/core/common/cloud/machine_level_user_cloud_policy_store_unittest.cc

Project Member

Comment 7 by bugdroid1@chromium.org, Mar 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8327d5a7aad10205e7ec0ceda49d7f2525120047

commit 8327d5a7aad10205e7ec0ceda49d7f2525120047
Author: Roger Tawa <rogerta@chromium.org>
Date: Tue Mar 20 21:30:30 2018

Add support for accessing the enrollment and DM tokens.

Helper functions are added to read the enrollment token and read and write
the DM token from the registry.  The installer also registers a command
with Google Update so that Chrome can write the DM token to the HKLM
registry hive.

BUG=812641

Change-Id: I9a49ebace33b7c157e5198deac1ed23f67638856
Reviewed-on: https://chromium-review.googlesource.com/961551
Commit-Queue: Roger Tawa <rogerta@chromium.org>
Reviewed-by: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544525}
[modify] https://crrev.com/8327d5a7aad10205e7ec0ceda49d7f2525120047/chrome/installer/setup/install_worker.cc
[modify] https://crrev.com/8327d5a7aad10205e7ec0ceda49d7f2525120047/chrome/installer/setup/install_worker.h
[modify] https://crrev.com/8327d5a7aad10205e7ec0ceda49d7f2525120047/chrome/installer/setup/setup_main.cc
[modify] https://crrev.com/8327d5a7aad10205e7ec0ceda49d7f2525120047/chrome/installer/setup/setup_util.cc
[modify] https://crrev.com/8327d5a7aad10205e7ec0ceda49d7f2525120047/chrome/installer/setup/setup_util.h
[modify] https://crrev.com/8327d5a7aad10205e7ec0ceda49d7f2525120047/chrome/installer/setup/setup_util_unittest.cc
[modify] https://crrev.com/8327d5a7aad10205e7ec0ceda49d7f2525120047/chrome/installer/util/install_util.cc
[modify] https://crrev.com/8327d5a7aad10205e7ec0ceda49d7f2525120047/chrome/installer/util/install_util.h
[modify] https://crrev.com/8327d5a7aad10205e7ec0ceda49d7f2525120047/chrome/installer/util/util_constants.cc
[modify] https://crrev.com/8327d5a7aad10205e7ec0ceda49d7f2525120047/chrome/installer/util/util_constants.h
[modify] https://crrev.com/8327d5a7aad10205e7ec0ceda49d7f2525120047/chrome/test/mini_installer/config/chrome_system_installed.prop
[modify] https://crrev.com/8327d5a7aad10205e7ec0ceda49d7f2525120047/chrome/test/mini_installer/config/chrome_system_updated.prop
[modify] https://crrev.com/8327d5a7aad10205e7ec0ceda49d7f2525120047/tools/metrics/histograms/enums.xml

Project Member

Comment 8 by bugdroid1@chromium.org, Mar 23 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/adac2e806f088d72ce752031eb2911409bfbe6c5

commit adac2e806f088d72ce752031eb2911409bfbe6c5
Author: Owen Min <zmin@chromium.org>
Date: Fri Mar 23 15:22:33 2018

Create BrowserDMTokenStorage

BrowserDMTokenStorage is used to save/load DMToken for
MachineLevelUserCloudPolicy. It's implemented on Windows only for now.

Bug: 812641
Change-Id: I9537199356caa0442eb675da379df2e5805dcdaf
Reviewed-on: https://chromium-review.googlesource.com/969754
Reviewed-by: Drew Wilson <atwilson@chromium.org>
Reviewed-by: Maksim Ivanov <emaxx@chromium.org>
Commit-Queue: Owen Min <zmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545453}
[modify] https://crrev.com/adac2e806f088d72ce752031eb2911409bfbe6c5/chrome/browser/BUILD.gn
[add] https://crrev.com/adac2e806f088d72ce752031eb2911409bfbe6c5/chrome/browser/policy/browser_dm_token_storage.h
[add] https://crrev.com/adac2e806f088d72ce752031eb2911409bfbe6c5/chrome/browser/policy/browser_dm_token_storage_stub.cc
[add] https://crrev.com/adac2e806f088d72ce752031eb2911409bfbe6c5/chrome/browser/policy/browser_dm_token_storage_stub.h
[add] https://crrev.com/adac2e806f088d72ce752031eb2911409bfbe6c5/chrome/browser/policy/browser_dm_token_storage_win.cc
[add] https://crrev.com/adac2e806f088d72ce752031eb2911409bfbe6c5/chrome/browser/policy/browser_dm_token_storage_win.h
[add] https://crrev.com/adac2e806f088d72ce752031eb2911409bfbe6c5/chrome/browser/policy/browser_dm_token_storage_win_unittest.cc
[modify] https://crrev.com/adac2e806f088d72ce752031eb2911409bfbe6c5/chrome/test/BUILD.gn

Project Member

Comment 9 by bugdroid1@chromium.org, Mar 28 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b1303e036ae818bc0b05236dcc7fd494a6e514d3

commit b1303e036ae818bc0b05236dcc7fd494a6e514d3
Author: Roger Tawa <rogerta@google.com>
Date: Wed Mar 28 21:32:27 2018

Add support in CloudPolicyClient for machine enrollment and reporting.

This CL calls the methods added in crrev.com/922398 for enrolling and sending
device reports.  This also update the test server code.

BUG=812641

Change-Id: Idd593739ad15e0907304b905c3e48a2059c68021
Reviewed-on: https://chromium-review.googlesource.com/923543
Commit-Queue: Roger Tawa <rogerta@chromium.org>
Reviewed-by: Drew Wilson <atwilson@chromium.org>
Reviewed-by: Sergey Poromov <poromov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546603}
[modify] https://crrev.com/b1303e036ae818bc0b05236dcc7fd494a6e514d3/components/policy/core/common/BUILD.gn
[modify] https://crrev.com/b1303e036ae818bc0b05236dcc7fd494a6e514d3/components/policy/core/common/cloud/cloud_policy_client.cc
[modify] https://crrev.com/b1303e036ae818bc0b05236dcc7fd494a6e514d3/components/policy/core/common/cloud/cloud_policy_client.h
[modify] https://crrev.com/b1303e036ae818bc0b05236dcc7fd494a6e514d3/components/policy/core/common/cloud/cloud_policy_client_registration_helper.cc
[modify] https://crrev.com/b1303e036ae818bc0b05236dcc7fd494a6e514d3/components/policy/core/common/cloud/cloud_policy_client_registration_helper.h
[modify] https://crrev.com/b1303e036ae818bc0b05236dcc7fd494a6e514d3/components/policy/core/common/cloud/cloud_policy_client_unittest.cc
[modify] https://crrev.com/b1303e036ae818bc0b05236dcc7fd494a6e514d3/components/policy/core/common/cloud/cloud_policy_service.cc
[add] https://crrev.com/b1303e036ae818bc0b05236dcc7fd494a6e514d3/components/policy/core/common/cloud/cloud_policy_util.cc
[add] https://crrev.com/b1303e036ae818bc0b05236dcc7fd494a6e514d3/components/policy/core/common/cloud/cloud_policy_util.h

Project Member

Comment 10 by bugdroid1@chromium.org, Mar 28 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e630584f338ec6862e302e62c878793845425042

commit e630584f338ec6862e302e62c878793845425042
Author: Owen Min <zmin@chromium.org>
Date: Wed Mar 28 21:36:09 2018

Add some helper function for machine level user cloud policy.

MachineLevelUserCloudPolicyRegistrar register a device with the enrollment
token and MachineLevelUserCloudPolicyFetcher poll the policy


Bug: 812641
Change-Id: I43a71c280d4e4c011a6a819a9d301278ed62a633
Reviewed-on: https://chromium-review.googlesource.com/978668
Commit-Queue: Owen Min <zmin@chromium.org>
Reviewed-by: Maksim Ivanov <emaxx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546604}
[modify] https://crrev.com/e630584f338ec6862e302e62c878793845425042/chrome/browser/BUILD.gn
[add] https://crrev.com/e630584f338ec6862e302e62c878793845425042/chrome/browser/policy/cloud/machine_level_user_cloud_policy_helper.cc
[add] https://crrev.com/e630584f338ec6862e302e62c878793845425042/chrome/browser/policy/cloud/machine_level_user_cloud_policy_helper.h

Project Member

Comment 11 by bugdroid1@chromium.org, Mar 28 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dac2831e9f9d2f8456ef43d561d6496ba701a921

commit dac2831e9f9d2f8456ef43d561d6496ba701a921
Author: Peter Mayo <petermayo@chromium.org>
Date: Wed Mar 28 21:43:57 2018

Revert "Add some helper function for machine level user cloud policy."

This reverts commit e630584f338ec6862e302e62c878793845425042.

Reason for revert: Compile failure on https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/Linux%20Builder/100469


Original change's description:
> Add some helper function for machine level user cloud policy.
> 
> MachineLevelUserCloudPolicyRegistrar register a device with the enrollment
> token and MachineLevelUserCloudPolicyFetcher poll the policy
> 
> 
> Bug: 812641
> Change-Id: I43a71c280d4e4c011a6a819a9d301278ed62a633
> Reviewed-on: https://chromium-review.googlesource.com/978668
> Commit-Queue: Owen Min <zmin@chromium.org>
> Reviewed-by: Maksim Ivanov <emaxx@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#546604}

TBR=emaxx@chromium.org,zmin@chromium.org

Change-Id: I68aa27e1c97b73e1d8ca1856a19ba44c9d6342dd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 812641
Reviewed-on: https://chromium-review.googlesource.com/985156
Reviewed-by: Peter Mayo <petermayo@chromium.org>
Commit-Queue: Peter Mayo <petermayo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546606}
[modify] https://crrev.com/dac2831e9f9d2f8456ef43d561d6496ba701a921/chrome/browser/BUILD.gn
[delete] https://crrev.com/7f520a8495ee33d9e4be72be42adab8efd0b96dd/chrome/browser/policy/cloud/machine_level_user_cloud_policy_helper.cc
[delete] https://crrev.com/7f520a8495ee33d9e4be72be42adab8efd0b96dd/chrome/browser/policy/cloud/machine_level_user_cloud_policy_helper.h

Project Member

Comment 12 by bugdroid1@chromium.org, Mar 29 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/736c9aedf31670b5d55a9746ba1c116fbeb5ef6c

commit 736c9aedf31670b5d55a9746ba1c116fbeb5ef6c
Author: Owen Min <zmin@chromium.org>
Date: Thu Mar 29 00:50:22 2018

Reland "Add some helper function for machine level user cloud policy."

This is a reland of e630584f338ec6862e302e62c878793845425042

Original change's description:
> Add some helper function for machine level user cloud policy.
>
> MachineLevelUserCloudPolicyRegistrar register a device with the enrollment
> token and MachineLevelUserCloudPolicyFetcher poll the policy
>
>
> Bug: 812641
> Change-Id: I43a71c280d4e4c011a6a819a9d301278ed62a633
> Reviewed-on: https://chromium-review.googlesource.com/978668
> Commit-Queue: Owen Min <zmin@chromium.org>
> Reviewed-by: Maksim Ivanov <emaxx@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#546604}

TBR=emaxx@chromium.org

Bug: 812641
Change-Id: Ie61f3fcd1d7a82e14d95349af1768f477466f774
Reviewed-on: https://chromium-review.googlesource.com/985253
Reviewed-by: Owen Min <zmin@chromium.org>
Commit-Queue: Owen Min <zmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#546678}
[modify] https://crrev.com/736c9aedf31670b5d55a9746ba1c116fbeb5ef6c/chrome/browser/BUILD.gn
[add] https://crrev.com/736c9aedf31670b5d55a9746ba1c116fbeb5ef6c/chrome/browser/policy/cloud/machine_level_user_cloud_policy_helper.cc
[add] https://crrev.com/736c9aedf31670b5d55a9746ba1c116fbeb5ef6c/chrome/browser/policy/cloud/machine_level_user_cloud_policy_helper.h

Project Member

Comment 13 by bugdroid1@chromium.org, Apr 5 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/aca071875a78e7c4169662284d483e44a2eca9a4

commit aca071875a78e7c4169662284d483e44a2eca9a4
Author: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Date: Thu Apr 05 09:01:46 2018

cloud_policy_util: IWYU: HOST_NAME_MAX needs limits.h.

Stop relying on the header being included implicitly. This fixes the build
with libstdc++ after b1303e036 ("Add support in CloudPolicyClient for
machine enrollment and reporting"):

    ../../components/policy/core/common/cloud/cloud_policy_util.cc: In function ‘std::__cxx11::string policy::GetMachineName()’:
    ../../components/policy/core/common/cloud/cloud_policy_util.cc:33:17: error: ‘HOST_NAME_MAX’ was not declared in this scope
       char hostname[HOST_NAME_MAX];
                     ^~~~~~~~~~~~~
    ../../components/policy/core/common/cloud/cloud_policy_util.cc:33:17: note: suggested alternative: ‘_SC_HOST_NAME_MAX’
       char hostname[HOST_NAME_MAX];
                     ^~~~~~~~~~~~~
                     _SC_HOST_NAME_MAX
    ../../components/policy/core/common/cloud/cloud_policy_util.cc:34:19: error: ‘hostname’ was not declared in this scope
       if (gethostname(hostname, HOST_NAME_MAX) == 0)  // Success.
                       ^~~~~~~~
    ../../components/policy/core/common/cloud/cloud_policy_util.cc:34:19: note: suggested alternative: ‘basename’
       if (gethostname(hostname, HOST_NAME_MAX) == 0)  // Success.
                       ^~~~~~~~
                       basename

While HOST_NAME_MAX is only used in the Linux code path, it should be
harmless to include the header unconditionally.

BUG=812641

Change-Id: I6769792efe188ff437753e4cb1ba134c341c20e9
Reviewed-on: https://chromium-review.googlesource.com/987895
Reviewed-by: Maksim Ivanov <emaxx@chromium.org>
Commit-Queue: Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
Cr-Commit-Position: refs/heads/master@{#548370}
[modify] https://crrev.com/aca071875a78e7c4169662284d483e44a2eca9a4/components/policy/core/common/cloud/cloud_policy_util.cc

Project Member

Comment 14 by bugdroid1@chromium.org, Apr 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7ce5235a6f0554ddb5d4e58012b0d0929ca273d9

commit 7ce5235a6f0554ddb5d4e58012b0d0929ca273d9
Author: Roger Tawa <rogerta@chromium.org>
Date: Fri Apr 06 16:46:04 2018

Add support in the browser policy connector for machine enrollment.

The connector determines if the machine must be enrolled to machine
level policies and begins the process if so.  The connector also
handles merging the machine level policies with the other policies
(system policies and user cloud policies).

Bug: 812641
Change-Id: I0d2e2f31cc689a6ad2a6eff96d57b49751ae1732
Reviewed-on: https://chromium-review.googlesource.com/980575
Commit-Queue: Roger Tawa <rogerta@chromium.org>
Reviewed-by: Drew Wilson <atwilson@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548811}
[modify] https://crrev.com/7ce5235a6f0554ddb5d4e58012b0d0929ca273d9/chrome/browser/policy/browser_dm_token_storage_win.cc
[modify] https://crrev.com/7ce5235a6f0554ddb5d4e58012b0d0929ca273d9/chrome/browser/policy/chrome_browser_policy_connector.cc
[modify] https://crrev.com/7ce5235a6f0554ddb5d4e58012b0d0929ca273d9/chrome/browser/policy/chrome_browser_policy_connector.h
[modify] https://crrev.com/7ce5235a6f0554ddb5d4e58012b0d0929ca273d9/chrome/browser/policy/cloud/DEPS
[add] https://crrev.com/7ce5235a6f0554ddb5d4e58012b0d0929ca273d9/chrome/browser/policy/cloud/machine_level_user_cloud_policy_browsertest.cc
[modify] https://crrev.com/7ce5235a6f0554ddb5d4e58012b0d0929ca273d9/chrome/browser/policy/cloud/machine_level_user_cloud_policy_helper.cc
[modify] https://crrev.com/7ce5235a6f0554ddb5d4e58012b0d0929ca273d9/chrome/browser/policy/profile_policy_connector.cc
[modify] https://crrev.com/7ce5235a6f0554ddb5d4e58012b0d0929ca273d9/chrome/browser/policy/test/policy_testserver.py
[modify] https://crrev.com/7ce5235a6f0554ddb5d4e58012b0d0929ca273d9/chrome/test/BUILD.gn
[modify] https://crrev.com/7ce5235a6f0554ddb5d4e58012b0d0929ca273d9/components/policy/core/browser/browser_policy_connector_base.cc
[modify] https://crrev.com/7ce5235a6f0554ddb5d4e58012b0d0929ca273d9/components/policy/core/browser/browser_policy_connector_base.h
[modify] https://crrev.com/7ce5235a6f0554ddb5d4e58012b0d0929ca273d9/components/policy/core/common/cloud/component_cloud_policy_service.cc

Project Member

Comment 15 by bugdroid1@chromium.org, Apr 6 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b373d864fc72cbf3b4143d68b6960c4b296ecdcb

commit b373d864fc72cbf3b4143d68b6960c4b296ecdcb
Author: Owen Min <zmin@chromium.org>
Date: Fri Apr 06 16:49:53 2018

Update CloudPolicyClient.UploadChromeDesktopReport.

Using unique_ptr instead of references to avoid copy of protobuf later.

Bug: 812641
Change-Id: I847dcf99a7e475d51a04897942ea39c5c84ca47b
Reviewed-on: https://chromium-review.googlesource.com/999043
Reviewed-by: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: Roger Tawa <rogerta@chromium.org>
Commit-Queue: Owen Min <zmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548815}
[modify] https://crrev.com/b373d864fc72cbf3b4143d68b6960c4b296ecdcb/components/policy/core/common/cloud/cloud_policy_client.cc
[modify] https://crrev.com/b373d864fc72cbf3b4143d68b6960c4b296ecdcb/components/policy/core/common/cloud/cloud_policy_client.h
[modify] https://crrev.com/b373d864fc72cbf3b4143d68b6960c4b296ecdcb/components/policy/core/common/cloud/cloud_policy_client_unittest.cc

Project Member

Comment 16 by bugdroid1@chromium.org, Apr 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a1dd74b043ea506deaeb7ef5f4cf46a91eb1f4b3

commit a1dd74b043ea506deaeb7ef5f4cf46a91eb1f4b3
Author: Roger Tawa <rogerta@chromium.org>
Date: Mon Apr 09 15:21:54 2018

Fix machine level token enrollment flow.

Add missing information during token enrollment flow (OS platform and
version) and fix a crash following the first policy fectch after the
registration.

Bug: 812641
Change-Id: I29a98dc5bdabaf61b0373595a28ce5576433784d
Reviewed-on: https://chromium-review.googlesource.com/998417
Commit-Queue: Roger Tawa <rogerta@chromium.org>
Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Owen Min <zmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#549180}
[modify] https://crrev.com/a1dd74b043ea506deaeb7ef5f4cf46a91eb1f4b3/chrome/browser/policy/cloud/machine_level_user_cloud_policy_helper.cc
[modify] https://crrev.com/a1dd74b043ea506deaeb7ef5f4cf46a91eb1f4b3/components/policy/core/DEPS
[modify] https://crrev.com/a1dd74b043ea506deaeb7ef5f4cf46a91eb1f4b3/components/policy/core/common/BUILD.gn
[modify] https://crrev.com/a1dd74b043ea506deaeb7ef5f4cf46a91eb1f4b3/components/policy/core/common/cloud/cloud_policy_client.cc
[modify] https://crrev.com/a1dd74b043ea506deaeb7ef5f4cf46a91eb1f4b3/components/policy/core/common/cloud/cloud_policy_client_unittest.cc
[modify] https://crrev.com/a1dd74b043ea506deaeb7ef5f4cf46a91eb1f4b3/components/policy/core/common/cloud/cloud_policy_util.cc
[modify] https://crrev.com/a1dd74b043ea506deaeb7ef5f4cf46a91eb1f4b3/components/policy/core/common/cloud/cloud_policy_util.h

Project Member

Comment 17 by bugdroid1@chromium.org, Apr 16 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/078d283cc439cbb2d4816ca85d4f4256b298ab29

commit 078d283cc439cbb2d4816ca85d4f4256b298ab29
Author: Owen Min <zmin@chromium.org>
Date: Mon Apr 16 16:23:28 2018

Publish metrics for MachineLevelUserCloudPolicy cache age.

Bug: 812641
Change-Id: Iea73bd9ead16bbda3e8a10576072f5b968d9ad35
Reviewed-on: https://chromium-review.googlesource.com/1013079
Reviewed-by: Jesse Doherty <jwd@chromium.org>
Reviewed-by: Maksim Ivanov <emaxx@chromium.org>
Commit-Queue: Owen Min <zmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550996}
[modify] https://crrev.com/078d283cc439cbb2d4816ca85d4f4256b298ab29/components/policy/core/common/cloud/cloud_policy_service.cc
[modify] https://crrev.com/078d283cc439cbb2d4816ca85d4f4256b298ab29/tools/metrics/histograms/histograms.xml

Project Member

Comment 18 by bugdroid1@chromium.org, Apr 17 2018

Labels: merge-merged-testbranch
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/078d283cc439cbb2d4816ca85d4f4256b298ab29

commit 078d283cc439cbb2d4816ca85d4f4256b298ab29
Author: Owen Min <zmin@chromium.org>
Date: Mon Apr 16 16:23:28 2018

Publish metrics for MachineLevelUserCloudPolicy cache age.

Bug: 812641
Change-Id: Iea73bd9ead16bbda3e8a10576072f5b968d9ad35
Reviewed-on: https://chromium-review.googlesource.com/1013079
Reviewed-by: Jesse Doherty <jwd@chromium.org>
Reviewed-by: Maksim Ivanov <emaxx@chromium.org>
Commit-Queue: Owen Min <zmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550996}
[modify] https://crrev.com/078d283cc439cbb2d4816ca85d4f4256b298ab29/components/policy/core/common/cloud/cloud_policy_service.cc
[modify] https://crrev.com/078d283cc439cbb2d4816ca85d4f4256b298ab29/tools/metrics/histograms/histograms.xml

Project Member

Comment 19 by bugdroid1@chromium.org, Apr 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0123c4930384ebc7e270aaff679614daa5744b20

commit 0123c4930384ebc7e270aaff679614daa5744b20
Author: Owen Min <zmin@chromium.org>
Date: Fri Apr 20 18:35:28 2018

Add new metrics for MachineLevelUserCloudPolicy enrollment.

1) Whether Chrome installed in the system level or not on Windows.
2) Whether enrollment succeed or not.

Bug: 812641
Change-Id: I30fa91a0451e03fd30024291aa2f40f7bbe442a1
Reviewed-on: https://chromium-review.googlesource.com/1013345
Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
Reviewed-by: Jesse Doherty <jwd@chromium.org>
Reviewed-by: Roger Tawa <rogerta@chromium.org>
Commit-Queue: Owen Min <zmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552401}
[modify] https://crrev.com/0123c4930384ebc7e270aaff679614daa5744b20/chrome/browser/policy/chrome_browser_policy_connector.cc
[modify] https://crrev.com/0123c4930384ebc7e270aaff679614daa5744b20/tools/metrics/histograms/enums.xml
[modify] https://crrev.com/0123c4930384ebc7e270aaff679614daa5744b20/tools/metrics/histograms/histograms.xml

Project Member

Comment 20 by bugdroid1@chromium.org, Apr 24 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f0353afcd325e0d7083252fe13b4e34742c481c3

commit f0353afcd325e0d7083252fe13b4e34742c481c3
Author: Owen Min <zmin@chromium.org>
Date: Tue Apr 24 20:33:15 2018

Adding browser test for MachineLevelUserCloudPolicy enrollment process.

Verify DM token fetch and store status.
Also add an observer for the enrollment process. This will be used
by upcoming browser launch block during enrollment feature.


Bug: 812641
Change-Id: I8d9df9ecc6cdbb3f6616253d597a82d3d9414810
Reviewed-on: https://chromium-review.googlesource.com/1020417
Commit-Queue: Owen Min <zmin@chromium.org>
Reviewed-by: Maksim Ivanov <emaxx@chromium.org>
Reviewed-by: Roger Tawa <rogerta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553250}
[modify] https://crrev.com/f0353afcd325e0d7083252fe13b4e34742c481c3/chrome/browser/policy/browser_dm_token_storage.h
[modify] https://crrev.com/f0353afcd325e0d7083252fe13b4e34742c481c3/chrome/browser/policy/browser_dm_token_storage_stub.cc
[modify] https://crrev.com/f0353afcd325e0d7083252fe13b4e34742c481c3/chrome/browser/policy/browser_dm_token_storage_win.cc
[modify] https://crrev.com/f0353afcd325e0d7083252fe13b4e34742c481c3/chrome/browser/policy/chrome_browser_policy_connector.cc
[modify] https://crrev.com/f0353afcd325e0d7083252fe13b4e34742c481c3/chrome/browser/policy/chrome_browser_policy_connector.h
[modify] https://crrev.com/f0353afcd325e0d7083252fe13b4e34742c481c3/chrome/browser/policy/cloud/machine_level_user_cloud_policy_browsertest.cc
[modify] https://crrev.com/f0353afcd325e0d7083252fe13b4e34742c481c3/chrome/browser/policy/test/policy_testserver.py
[modify] https://crrev.com/f0353afcd325e0d7083252fe13b4e34742c481c3/components/policy/core/common/BUILD.gn
[add] https://crrev.com/f0353afcd325e0d7083252fe13b4e34742c481c3/components/policy/core/common/cloud/machine_level_user_cloud_policy_metrics.h

Project Member

Comment 21 by bugdroid1@chromium.org, May 16 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/eb49ccc013d304921d419249b955a0bf03905ca6

commit eb49ccc013d304921d419249b955a0bf03905ca6
Author: Greg Thompson <grt@chromium.org>
Date: Wed May 16 15:40:31 2018

Logging tweaks for enrollment token retrieval.

This change suppresses error logging when the Policies key does not
exist, as this is an acceptable (and expected) condition.

This CL also:

- Changes from requesting KEY_READ to KEY_QUERY_VALUE rights when
  opening the Policies key (principle of least privilege).
- Removes some misleading wording in the emitted error messages (the
  call to Open() does not result in the creation of a key, and the call
  to ReadValue() does not write anything).
- Switches to a combination of SetLastError and PLOG so that the log
  messages contain a human-readable error code.
- Shortens the error messages -- the reader can inspect the code given
  the emitted file+line info if needed.
- Removes an early-exit path, as RegKey::ReadValue is documented as not
  modifying its out param in case of error.

BUG=812641,840369
R=rogerta@chromium.org

Change-Id: I8990f85a4595b5356196e24167738222653846d2
Reviewed-on: https://chromium-review.googlesource.com/1060058
Reviewed-by: Roger Tawa <rogerta@chromium.org>
Commit-Queue: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#559116}
[modify] https://crrev.com/eb49ccc013d304921d419249b955a0bf03905ca6/chrome/installer/util/install_util.cc

Cc: rogerta@chromium.org
Labels: -Pri-3 TargetedFor-69 OS-Linux OS-Mac OS-Windows Pri-1
Owner: georgesak@chromium.org
Status: Started (was: Untriaged)
Project Member

Comment 23 by bugdroid1@chromium.org, Jul 16

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1c479eb8e6677209ab599e3102e32d2d9dc99726

commit 1c479eb8e6677209ab599e3102e32d2d9dc99726
Author: Georges Khalil <georgesak@chromium.org>
Date: Mon Jul 16 15:26:56 2018

Refactor BrowserDMTokenStorage for easier platform implementations.

This CL refactors BrowserDMTokenStorage & BrowserDMTokenStorageWin to move code that is common to all platforms.

After this CL, adding a new platform requires implementing the following methods:

-  virtual std::string InitClientId();
-  virtual std::string InitEnrollmentToken();
-  virtual std::string InitDMToken();
-  virtual void SaveDMToken(const std::string& token);

Note that this CL keeps the existing Windows implementation, it only refactors the code (no functional change).

BUG=812641

Change-Id: If362c4368160e7bd038a8a4b1d93e151c0a60e1b
Reviewed-on: https://chromium-review.googlesource.com/1133315
Commit-Queue: Georges Khalil <georgesak@chromium.org>
Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
Reviewed-by: Roger Tawa <rogerta@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575276}
[modify] https://crrev.com/1c479eb8e6677209ab599e3102e32d2d9dc99726/chrome/browser/BUILD.gn
[add] https://crrev.com/1c479eb8e6677209ab599e3102e32d2d9dc99726/chrome/browser/policy/browser_dm_token_storage.cc
[modify] https://crrev.com/1c479eb8e6677209ab599e3102e32d2d9dc99726/chrome/browser/policy/browser_dm_token_storage.h
[delete] https://crrev.com/8e011de2bd6227ae369f61188c93929c3c01db63/chrome/browser/policy/browser_dm_token_storage_stub.cc
[delete] https://crrev.com/8e011de2bd6227ae369f61188c93929c3c01db63/chrome/browser/policy/browser_dm_token_storage_stub.h
[add] https://crrev.com/1c479eb8e6677209ab599e3102e32d2d9dc99726/chrome/browser/policy/browser_dm_token_storage_unittest.cc
[modify] https://crrev.com/1c479eb8e6677209ab599e3102e32d2d9dc99726/chrome/browser/policy/browser_dm_token_storage_win.cc
[modify] https://crrev.com/1c479eb8e6677209ab599e3102e32d2d9dc99726/chrome/browser/policy/browser_dm_token_storage_win.h
[modify] https://crrev.com/1c479eb8e6677209ab599e3102e32d2d9dc99726/chrome/browser/policy/browser_dm_token_storage_win_unittest.cc
[modify] https://crrev.com/1c479eb8e6677209ab599e3102e32d2d9dc99726/chrome/browser/policy/machine_level_user_cloud_policy_controller.cc
[modify] https://crrev.com/1c479eb8e6677209ab599e3102e32d2d9dc99726/chrome/test/BUILD.gn

Project Member

Comment 24 by bugdroid1@chromium.org, Jul 16

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e0ca7658cdbb708cd2751cc1e62ffae6ac04d313

commit e0ca7658cdbb708cd2751cc1e62ffae6ac04d313
Author: Owen Min <zmin@chromium.org>
Date: Mon Jul 16 15:45:36 2018

Revert "Refactor BrowserDMTokenStorage for easier platform implementations."

This reverts commit 1c479eb8e6677209ab599e3102e32d2d9dc99726.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Refactor BrowserDMTokenStorage for easier platform implementations.
> 
> This CL refactors BrowserDMTokenStorage & BrowserDMTokenStorageWin to move code that is common to all platforms.
> 
> After this CL, adding a new platform requires implementing the following methods:
> 
> -  virtual std::string InitClientId();
> -  virtual std::string InitEnrollmentToken();
> -  virtual std::string InitDMToken();
> -  virtual void SaveDMToken(const std::string& token);
> 
> Note that this CL keeps the existing Windows implementation, it only refactors the code (no functional change).
> 
> BUG=812641
> 
> Change-Id: If362c4368160e7bd038a8a4b1d93e151c0a60e1b
> Reviewed-on: https://chromium-review.googlesource.com/1133315
> Commit-Queue: Georges Khalil <georgesak@chromium.org>
> Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
> Reviewed-by: Roger Tawa <rogerta@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#575276}

TBR=rogerta@chromium.org,pastarmovj@chromium.org,georgesak@chromium.org,zmin@chromium.org

Change-Id: Idbf78da964051aaac710b780fabccf248c8d583e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 812641
Reviewed-on: https://chromium-review.googlesource.com/1138513
Reviewed-by: Owen Min <zmin@chromium.org>
Commit-Queue: Owen Min <zmin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575281}
[modify] https://crrev.com/e0ca7658cdbb708cd2751cc1e62ffae6ac04d313/chrome/browser/BUILD.gn
[delete] https://crrev.com/b00c31d425e08867ade6a600b32b948c0f717dd7/chrome/browser/policy/browser_dm_token_storage.cc
[modify] https://crrev.com/e0ca7658cdbb708cd2751cc1e62ffae6ac04d313/chrome/browser/policy/browser_dm_token_storage.h
[add] https://crrev.com/e0ca7658cdbb708cd2751cc1e62ffae6ac04d313/chrome/browser/policy/browser_dm_token_storage_stub.cc
[add] https://crrev.com/e0ca7658cdbb708cd2751cc1e62ffae6ac04d313/chrome/browser/policy/browser_dm_token_storage_stub.h
[delete] https://crrev.com/b00c31d425e08867ade6a600b32b948c0f717dd7/chrome/browser/policy/browser_dm_token_storage_unittest.cc
[modify] https://crrev.com/e0ca7658cdbb708cd2751cc1e62ffae6ac04d313/chrome/browser/policy/browser_dm_token_storage_win.cc
[modify] https://crrev.com/e0ca7658cdbb708cd2751cc1e62ffae6ac04d313/chrome/browser/policy/browser_dm_token_storage_win.h
[modify] https://crrev.com/e0ca7658cdbb708cd2751cc1e62ffae6ac04d313/chrome/browser/policy/browser_dm_token_storage_win_unittest.cc
[modify] https://crrev.com/e0ca7658cdbb708cd2751cc1e62ffae6ac04d313/chrome/browser/policy/machine_level_user_cloud_policy_controller.cc
[modify] https://crrev.com/e0ca7658cdbb708cd2751cc1e62ffae6ac04d313/chrome/test/BUILD.gn

Project Member

Comment 25 by bugdroid1@chromium.org, Jul 16

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a9fab63ea089dadb31b65b14bea5c406e503fb35

commit a9fab63ea089dadb31b65b14bea5c406e503fb35
Author: Georges Khalil <georgesak@chromium.org>
Date: Mon Jul 16 18:32:08 2018

Fix compile issue for 1133315.

This is a reland for 1133315. A global function was mistakenly moved lower, and was not visible to calls that happened before it.

Refactor BrowserDMTokenStorage for easier platform implementations.

This CL refactors BrowserDMTokenStorage & BrowserDMTokenStorageWin to move code that is common to all platforms.

After this CL, adding a new platform requires implementing the following methods:

-  virtual std::string InitClientId();
-  virtual std::string InitEnrollmentToken();
-  virtual std::string InitDMToken();
-  virtual void SaveDMToken(const std::string& token);

Note that this CL keeps the existing Windows implementation, it only refactors the code (no functional change).

BUG=812641

TBR: pastarmovj
Change-Id: I51d6b4efef6066d602a59c514e9db88e414e4337
Reviewed-on: https://chromium-review.googlesource.com/1138539
Reviewed-by: Georges Khalil <georgesak@chromium.org>
Commit-Queue: Georges Khalil <georgesak@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575356}
[modify] https://crrev.com/a9fab63ea089dadb31b65b14bea5c406e503fb35/chrome/browser/BUILD.gn
[add] https://crrev.com/a9fab63ea089dadb31b65b14bea5c406e503fb35/chrome/browser/policy/browser_dm_token_storage.cc
[modify] https://crrev.com/a9fab63ea089dadb31b65b14bea5c406e503fb35/chrome/browser/policy/browser_dm_token_storage.h
[delete] https://crrev.com/6a2be53da97fad3f1f84e0f6fcd63b00d18831ea/chrome/browser/policy/browser_dm_token_storage_stub.cc
[delete] https://crrev.com/6a2be53da97fad3f1f84e0f6fcd63b00d18831ea/chrome/browser/policy/browser_dm_token_storage_stub.h
[add] https://crrev.com/a9fab63ea089dadb31b65b14bea5c406e503fb35/chrome/browser/policy/browser_dm_token_storage_unittest.cc
[modify] https://crrev.com/a9fab63ea089dadb31b65b14bea5c406e503fb35/chrome/browser/policy/browser_dm_token_storage_win.cc
[modify] https://crrev.com/a9fab63ea089dadb31b65b14bea5c406e503fb35/chrome/browser/policy/browser_dm_token_storage_win.h
[modify] https://crrev.com/a9fab63ea089dadb31b65b14bea5c406e503fb35/chrome/browser/policy/browser_dm_token_storage_win_unittest.cc
[modify] https://crrev.com/a9fab63ea089dadb31b65b14bea5c406e503fb35/chrome/browser/policy/machine_level_user_cloud_policy_controller.cc
[modify] https://crrev.com/a9fab63ea089dadb31b65b14bea5c406e503fb35/chrome/test/BUILD.gn

Do you want to fix your debug output?

92	  if (machine_id_trimmed.size() != machine_id_size) {
93	    SYSLOG(ERROR) << "Error: /etc/machine-id contains " << machine_id_size
94	                  << " characters (" << machine_id_size << " were expected).";
95	    return std::string();
96	  }

produces

[ RUN      ] PageLoadMetricsBrowserTest.ReceivedAggregateResourceDataLength
Xlib:  extension "RANDR" missing on display ":99".
[5452:5452:0909/124324.726883:ERROR:browser_dm_token_storage_linux.cc(93)] Error: /etc/machine-id contains 32 characters (32 were expected).

Observed here: https://chromium-swarm.appspot.com/task?id=3fd8a8c3787e2e10&refresh=10&show_raw=1
Oops, thx.

zmin@, do you mind making this 1 liner fix? 1st machine_id_size should be machine_id_trimmed.size().

Project Member

Comment 29 by bugdroid1@chromium.org, Sep 12

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c07e9914260d37ad818dfb0fe2ac185eb1eceb7b

commit c07e9914260d37ad818dfb0fe2ac185eb1eceb7b
Author: Oskar Sundbom <ossu@chromium.org>
Date: Wed Sep 12 13:38:43 2018

Fix tiny logging error in browser_dm_token_storage_linux.cc

Stumbled over this when sheriffing.

Bug: 812641
Change-Id: Ia3aa2e6d238826e766a1422d0ba7c74f18442a09
Reviewed-on: https://chromium-review.googlesource.com/1221626
Reviewed-by: Julian Pastarmov <pastarmovj@chromium.org>
Commit-Queue: Oskar Sundbom <ossu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590658}
[modify] https://crrev.com/c07e9914260d37ad818dfb0fe2ac185eb1eceb7b/chrome/browser/policy/browser_dm_token_storage_linux.cc

Sign in to add a comment