Enable Google Update policy display on macOS via Mojo APIs [chromium/src : main]

0 views
Skip to first unread message

Aaron Teo (Gerrit)

unread,
May 8, 2026, 7:13:14 AM (2 days ago) May 8
to Lance Bai, Chromium LUCI CQ, chromium...@chromium.org, Enterprise Policy Reviews
Attention needed from Lance Bai

Aaron Teo voted and added 1 comment

Votes added by Aaron Teo

Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Aaron Teo . resolved

Hello, I was browsing the GFB list and found your CL. I will help you run tryjobs as you requested, but I will leave the technical review to the directory owner.

Open in Gerrit

Related details

Attention is currently required from:
  • Lance Bai
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I38a58db5e28a0d4b72744458660f43d3a72636f0
Gerrit-Change-Number: 7828541
Gerrit-PatchSet: 3
Gerrit-Owner: Lance Bai <lanc...@gmail.com>
Gerrit-Reviewer: Aaron Teo <hoch...@chromium.org>
Gerrit-Reviewer: Lance Bai <lanc...@gmail.com>
Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
Gerrit-Attention: Lance Bai <lanc...@gmail.com>
Gerrit-Comment-Date: Fri, 08 May 2026 11:13:03 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Lance Bai (Gerrit)

unread,
May 9, 2026, 6:27:01 AM (yesterday) May 9
to Aaron Teo, Chromium LUCI CQ, chromium...@chromium.org, Enterprise Policy Reviews
Attention needed from Aaron Teo

Lance Bai added 1 comment

Patchset-level comments
File-level comment, Patchset 3:
Aaron Teo . unresolved

Hello, I was browsing the GFB list and found your CL. I will help you run tryjobs as you requested, but I will leave the technical review to the directory owner.

Lance Bai

Hi Aaron,
Thanks for the help. I have updated the patch corresponding to the build failures.
can you trigger the tryjob again, or add win-rel to the check list the tryjobs.

Open in Gerrit

Related details

Attention is currently required from:
  • Aaron Teo
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I38a58db5e28a0d4b72744458660f43d3a72636f0
    Gerrit-Change-Number: 7828541
    Gerrit-PatchSet: 4
    Gerrit-Owner: Lance Bai <lanc...@gmail.com>
    Gerrit-Reviewer: Lance Bai <lanc...@gmail.com>
    Gerrit-CC: Aaron Teo <hoch...@chromium.org>
    Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
    Gerrit-Attention: Aaron Teo <hoch...@chromium.org>
    Gerrit-Comment-Date: Sat, 09 May 2026 10:26:39 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Aaron Teo <hoch...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Lance Bai (Gerrit)

    unread,
    May 9, 2026, 6:41:35 AM (yesterday) May 9
    to Noah Rose Ledesma, Aaron Teo, Chromium LUCI CQ, chromium...@chromium.org, Enterprise Policy Reviews
    Attention needed from Aaron Teo and Noah Rose Ledesma

    Lance Bai added 1 comment

    Patchset-level comments
    File-level comment, Patchset 4 (Latest):
    Lance Bai . resolved

    Hi Noah,
    I add you as the reviewer, feel free to reassign it if more appropriate.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Aaron Teo
    • Noah Rose Ledesma
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I38a58db5e28a0d4b72744458660f43d3a72636f0
    Gerrit-Change-Number: 7828541
    Gerrit-PatchSet: 4
    Gerrit-Owner: Lance Bai <lanc...@gmail.com>
    Gerrit-Reviewer: Lance Bai <lanc...@gmail.com>
    Gerrit-Reviewer: Noah Rose Ledesma <noah...@google.com>
    Gerrit-CC: Aaron Teo <hoch...@chromium.org>
    Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
    Gerrit-Attention: Aaron Teo <hoch...@chromium.org>
    Gerrit-Attention: Noah Rose Ledesma <noah...@google.com>
    Gerrit-Comment-Date: Sat, 09 May 2026 10:41:13 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Aaron Teo (Gerrit)

    unread,
    May 9, 2026, 7:13:55 AM (yesterday) May 9
    to Lance Bai, Noah Rose Ledesma, Chromium LUCI CQ, chromium...@chromium.org, Enterprise Policy Reviews
    Attention needed from Lance Bai and Noah Rose Ledesma

    Aaron Teo added 14 comments

    Patchset-level comments
    Aaron Teo . unresolved

    Hello, I was browsing the GFB list and found your CL. I will help you run tryjobs as you requested, but I will leave the technical review to the directory owner.

    Lance Bai

    Hi Aaron,
    Thanks for the help. I have updated the patch corresponding to the build failures.
    can you trigger the tryjob again, or add win-rel to the check list the tryjobs.

    Aaron Teo

    Thank you for updating this patch. Based on the tryjobs results, you also need to update the AUTHORS file to add your name and email address.

    https://source.chromium.org/chromium/chromium/src/+/main:AUTHORS

    Please also ensure that you have signed the CLA and address my review comments. After you have made the necessary changes, we can run the tryjobs again.

    File chrome/browser/BUILD.gn
    Line 4196, Patchset 4 (Latest): sources += [
    "policy/status_provider/updater_status_and_value_provider.cc",
    "policy/status_provider/updater_status_and_value_provider.h",
    ]
    File chrome/browser/google/google_update_policy_fetcher_common.h
    Line 58, Patchset 4 (Latest):// `app_id` is used to filter per-app policies (e.g., bundle ID on macOS).
    Aaron Teo . unresolved

    ```suggestion
    // |app_id| is used to filter per-app policies (e.g., bundle ID on macOS).
    ```

    File chrome/browser/google/google_update_policy_fetcher_common.cc
    Line 15, Patchset 4 (Latest):
    Aaron Teo . unresolved

    Please delete the extra blank lines here.

    File chrome/browser/google/google_update_policy_fetcher_common_unittest.cc
    Line 14, Patchset 4 (Latest):const char kTestAppId[] = "com.google.Chrome";

    const char kTestJson[] = R"({
    "policiesByName": {
    "LastCheckPeriod": {
    "prevailingSource": "Device Management",
    "valuesBySource": {
    "Device Management": 120
    }
    },
    "ProxyMode": {
    "prevailingSource": "Managed Preferences",
    "valuesBySource": {
    "Managed Preferences": "fixed_servers"
    }
    },
    "UpdatesSuppressed": {
    "prevailingSource": "Device Management",
    "valuesBySource": {
    "Device Management": {
    "StartHour": 1,
    "StartMinute": 30,
    "Duration": 60
    }
    }
    }
    },
    "policiesByAppId": {
    "com.google.Chrome": {
    "Update": {
    "prevailingSource": "Device Management",
    "valuesBySource": {
    "Device Management": 1
    }
    }
    }
    }
    })";
    Aaron Teo . unresolved

    Perhaps we could use `constexpr`?

    Line 59, Patchset 4 (Latest): // Check global policy
    Aaron Teo . unresolved

    Perhaps we could add a `.` (punctuation).

    Line 72, Patchset 4 (Latest): // Check composite policy (UpdatesSuppressed)
    Aaron Teo . unresolved

    ditto

    Line 83, Patchset 4 (Latest): // Check app policy
    Aaron Teo . unresolved

    ditto

    File chrome/browser/google/google_update_policy_fetcher_win.cc
    Line 209, Patchset 4 (Latest):// Fetches all the Google Update Policies and state values available through the
    Aaron Teo . unresolved

    Redundant?

    File chrome/browser/policy/policy_value_and_status_aggregator.cc
    Line 46, Patchset 4 (Latest):#if (BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)) || \
    BUILDFLAG(IS_MAC)
    Aaron Teo . unresolved

    Please also add the appropriate owner to the policy-related files.

    File chrome/browser/policy/status_provider/updater_status_and_value_provider.cc
    Line 7, Patchset 4 (Latest):#include "build/build_config.h"
    #include "build/buildflag.h"

    #if BUILDFLAG(IS_WIN)
    #include <windows.h>

    #include <DSRole.h>
    #endif

    #include <algorithm>
    #include <utility>

    #include "base/sequence_checker.h"
    #include "base/strings/utf_string_conversions.h"
    #include "base/task/task_traits.h"
    #include "base/task/thread_pool.h"
    #include "base/values.h"
    #if BUILDFLAG(IS_WIN)
    #include "chrome/browser/google/google_update_policy_fetcher_win.h"
    #endif
    #include "chrome/browser/google/google_update_policy_fetcher_common.h"
    #if BUILDFLAG(IS_MAC)
    #include "base/apple/foundation_util.h"
    #include "base/barrier_closure.h"
    #include "chrome/browser/updater/updater.h"
    #endif
    Aaron Teo . unresolved

    Please sort the header files according to the style guide, and ensure that any header files you modify or add are required.

    https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes

    Line 61, Patchset 4 (Latest):#endif
    Aaron Teo . unresolved

    Perhaps we could add `// if BUILDFLAG(IS_WIN)`?

    Regarding the changes to the header file mentioned in the previous comment, it is also recommended to add comments after the endif statement.

    Line 77, Patchset 4 (Latest):#endif
    Aaron Teo . unresolved

    ditto

    Line 183, Patchset 4 (Latest):#endif
    Aaron Teo . unresolved

    ditto

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Lance Bai
    • Noah Rose Ledesma
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I38a58db5e28a0d4b72744458660f43d3a72636f0
    Gerrit-Change-Number: 7828541
    Gerrit-PatchSet: 4
    Gerrit-Owner: Lance Bai <lanc...@gmail.com>
    Gerrit-Reviewer: Lance Bai <lanc...@gmail.com>
    Gerrit-Reviewer: Noah Rose Ledesma <noah...@google.com>
    Gerrit-CC: Aaron Teo <hoch...@chromium.org>
    Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
    Gerrit-Attention: Lance Bai <lanc...@gmail.com>
    Gerrit-Attention: Noah Rose Ledesma <noah...@google.com>
    Gerrit-Comment-Date: Sat, 09 May 2026 11:13:44 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Lance Bai <lanc...@gmail.com>
    Comment-In-Reply-To: Aaron Teo <hoch...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Aaron Teo (Gerrit)

    unread,
    May 9, 2026, 7:43:09 AM (yesterday) May 9
    to Lance Bai, Noah Rose Ledesma, Chromium LUCI CQ, chromium...@chromium.org, Enterprise Policy Reviews
    Attention needed from Lance Bai and Noah Rose Ledesma

    Aaron Teo added 1 comment

    File chrome/browser/policy/status_provider/updater_status_and_value_provider.cc
    Aaron Teo . unresolved

    Perhaps we could add `// if BUILDFLAG(IS_WIN)`?

    Regarding the changes to the header file mentioned in the previous comment, it is also recommended to add comments after the endif statement.

    Aaron Teo

    Correct a minor flaw in the previous comment.

    `// BUILDFLAG(IS_WIN)`

    Gerrit-Comment-Date: Sat, 09 May 2026 11:42:33 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Aaron Teo <hoch...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Lance Bai (Gerrit)

    unread,
    May 9, 2026, 1:33:58 PM (23 hours ago) May 9
    to Noah Rose Ledesma, Aaron Teo, Chromium LUCI CQ, chromium...@chromium.org, Enterprise Policy Reviews
    Attention needed from Aaron Teo and Noah Rose Ledesma

    Lance Bai added 13 comments

    File chrome/browser/BUILD.gn
    Line 4196, Patchset 4: sources += [
    "policy/status_provider/updater_status_and_value_provider.cc",
    "policy/status_provider/updater_status_and_value_provider.h",
    ]
    Aaron Teo . resolved
    Lance Bai

    Done

    File chrome/browser/google/google_update_policy_fetcher_common.h
    Line 58, Patchset 4:// `app_id` is used to filter per-app policies (e.g., bundle ID on macOS).
    Aaron Teo . resolved

    ```suggestion
    // |app_id| is used to filter per-app policies (e.g., bundle ID on macOS).
    ```

    Lance Bai

    Done

    File chrome/browser/google/google_update_policy_fetcher_common.cc
    Line 15, Patchset 4:
    Aaron Teo . resolved

    Please delete the extra blank lines here.

    Lance Bai

    Done

    File chrome/browser/google/google_update_policy_fetcher_common_unittest.cc
    Line 14, Patchset 4:const char kTestAppId[] = "com.google.Chrome";
    Aaron Teo . resolved

    Perhaps we could use `constexpr`?

    Lance Bai

    Done

    Line 59, Patchset 4: // Check global policy
    Aaron Teo . resolved

    Perhaps we could add a `.` (punctuation).

    Lance Bai

    Done

    Line 72, Patchset 4: // Check composite policy (UpdatesSuppressed)
    Aaron Teo . resolved

    ditto

    Lance Bai

    Done

    Line 83, Patchset 4: // Check app policy
    Aaron Teo . resolved

    ditto

    Lance Bai

    Done

    File chrome/browser/google/google_update_policy_fetcher_win.cc
    Line 209, Patchset 4:// Fetches all the Google Update Policies and state values available through the
    Aaron Teo . resolved

    Redundant?

    Lance Bai

    Done

    File chrome/browser/policy/policy_value_and_status_aggregator.cc
    Line 46, Patchset 4:#if (BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)) || \
    BUILDFLAG(IS_MAC)
    Aaron Teo . resolved

    Please also add the appropriate owner to the policy-related files.

    Lance Bai

    I have run `git cl owners` and added
    enterprise-p...@google.com

    File chrome/browser/policy/status_provider/updater_status_and_value_provider.cc
    Line 7, Patchset 4:#include "build/build_config.h"

    #include "build/buildflag.h"

    #if BUILDFLAG(IS_WIN)
    #include <windows.h>

    #include <DSRole.h>
    #endif

    #include <algorithm>
    #include <utility>

    #include "base/sequence_checker.h"
    #include "base/strings/utf_string_conversions.h"
    #include "base/task/task_traits.h"
    #include "base/task/thread_pool.h"
    #include "base/values.h"
    #if BUILDFLAG(IS_WIN)
    #include "chrome/browser/google/google_update_policy_fetcher_win.h"
    #endif
    #include "chrome/browser/google/google_update_policy_fetcher_common.h"
    #if BUILDFLAG(IS_MAC)
    #include "base/apple/foundation_util.h"
    #include "base/barrier_closure.h"
    #include "chrome/browser/updater/updater.h"
    #endif
    Aaron Teo . resolved

    Please sort the header files according to the style guide, and ensure that any header files you modify or add are required.

    https://google.github.io/styleguide/cppguide.html#Names_and_Order_of_Includes

    Lance Bai

    Done

    Line 61, Patchset 4:#endif
    Aaron Teo . resolved

    Perhaps we could add `// if BUILDFLAG(IS_WIN)`?

    Regarding the changes to the header file mentioned in the previous comment, it is also recommended to add comments after the endif statement.

    Aaron Teo

    Correct a minor flaw in the previous comment.

    `// BUILDFLAG(IS_WIN)`

    Lance Bai

    Done

    Line 77, Patchset 4:#endif
    Aaron Teo . resolved

    ditto

    Lance Bai

    Done

    Line 183, Patchset 4:#endif
    Aaron Teo . resolved

    ditto

    Lance Bai

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Aaron Teo
    • Noah Rose Ledesma
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I38a58db5e28a0d4b72744458660f43d3a72636f0
    Gerrit-Change-Number: 7828541
    Gerrit-PatchSet: 5
    Gerrit-Owner: Lance Bai <lanc...@gmail.com>
    Gerrit-Reviewer: Lance Bai <lanc...@gmail.com>
    Gerrit-Reviewer: Noah Rose Ledesma <noah...@google.com>
    Gerrit-CC: Aaron Teo <hoch...@chromium.org>
    Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
    Gerrit-Attention: Aaron Teo <hoch...@chromium.org>
    Gerrit-Attention: Noah Rose Ledesma <noah...@google.com>
    Gerrit-Comment-Date: Sat, 09 May 2026 17:33:35 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Lance Bai (Gerrit)

    unread,
    May 9, 2026, 1:38:17 PM (23 hours ago) May 9
    to Noah Rose Ledesma, Aaron Teo, Chromium LUCI CQ, chromium...@chromium.org, Enterprise Policy Reviews
    Attention needed from Aaron Teo and Noah Rose Ledesma

    Lance Bai added 2 comments

    Patchset-level comments

    Hello, I was browsing the GFB list and found your CL. I will help you run tryjobs as you requested, but I will leave the technical review to the directory owner.

    Lance Bai

    Hi Aaron,
    Thanks for the help. I have updated the patch corresponding to the build failures.
    can you trigger the tryjob again, or add win-rel to the check list the tryjobs.

    Aaron Teo

    Thank you for updating this patch. Based on the tryjobs results, you also need to update the AUTHORS file to add your name and email address.

    https://source.chromium.org/chromium/chromium/src/+/main:AUTHORS

    Please also ensure that you have signed the CLA and address my review comments. After you have made the necessary changes, we can run the tryjobs again.

    Lance Bai

    Done

    File-level comment, Patchset 5 (Latest):
    Lance Bai . resolved

    Hi Aaron, thanks for your input, I have

    • updated the CL corresponding to your comments.
    • signed CLA and added myself into Authors.
    • run `git cl owners` and add enterprise-p...@google.com

    let me know if I have missed anything.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Aaron Teo
    • Noah Rose Ledesma
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I38a58db5e28a0d4b72744458660f43d3a72636f0
      Gerrit-Change-Number: 7828541
      Gerrit-PatchSet: 5
      Gerrit-Owner: Lance Bai <lanc...@gmail.com>
      Gerrit-Reviewer: Lance Bai <lanc...@gmail.com>
      Gerrit-Reviewer: Noah Rose Ledesma <noah...@google.com>
      Gerrit-CC: Aaron Teo <hoch...@chromium.org>
      Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
      Gerrit-Attention: Aaron Teo <hoch...@chromium.org>
      Gerrit-Attention: Noah Rose Ledesma <noah...@google.com>
      Gerrit-Comment-Date: Sat, 09 May 2026 17:37:59 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Aaron Teo (Gerrit)

      unread,
      May 9, 2026, 8:55:46 PM (16 hours ago) May 9
      to Lance Bai, Noah Rose Ledesma, Chromium LUCI CQ, chromium...@chromium.org, Enterprise Policy Reviews
      Attention needed from Lance Bai and Noah Rose Ledesma

      Aaron Teo added 4 comments

      Patchset-level comments
      Lance Bai . resolved

      Hi Aaron, thanks for your input, I have

      • updated the CL corresponding to your comments.
      • signed CLA and added myself into Authors.
      • run `git cl owners` and add enterprise-p...@google.com

      let me know if I have missed anything.

      Aaron Teo

      Thank you for updating this CL. There are still a few minor issues. Also, please move `enterprise-p...@google.com` to the Reviewers list and set an Attention Set.

      File chrome/browser/policy/BUILD.gn
      Line 814, Patchset 5 (Latest): "status_provider/updater_status_and_value_provider.h",
      Aaron Teo . unresolved

      This appears to be a duplicate of line 806 above. If this file is necessary, perhaps we should modify the if condition here.

      Line 1146, Patchset 5 (Latest): "status_provider/updater_status_and_value_provider.cc",
      Aaron Teo . unresolved

      Similar to the previous comment.

      File chrome/browser/policy/status_provider/updater_status_and_value_provider.cc
      Line 5, Patchset 5 (Latest):#include "chrome/browser/policy/status_provider/updater_status_and_value_provider.h"


      #include "build/build_config.h"
      #include "build/buildflag.h"

      #if BUILDFLAG(IS_WIN)
      #include <windows.h>

      #include <DSRole.h>
      #endif // BUILDFLAG(IS_WIN)

      #include <algorithm>
      #include <utility>


      #if BUILDFLAG(IS_MAC)
      #include "base/apple/foundation_util.h"
      #include "base/barrier_closure.h"
      #endif // BUILDFLAG(IS_MAC)


      #include "base/sequence_checker.h"
      #include "base/strings/utf_string_conversions.h"
      #include "base/task/task_traits.h"
      #include "base/task/thread_pool.h"
      #include "base/values.h"
      #include "chrome/browser/google/google_update_policy_fetcher_common.h"
      #if BUILDFLAG(IS_WIN)
      #include "chrome/browser/google/google_update_policy_fetcher_win.h"
      #endif // BUILDFLAG(IS_WIN)
      #include "chrome/browser/policy/chrome_policy_conversions_client.h"
      #include "chrome/browser/profiles/profile.h"
      #if BUILDFLAG(IS_MAC)
      #include "chrome/browser/updater/updater.h"
      #endif // BUILDFLAG(IS_MAC)
      #include "components/policy/core/browser/policy_conversions.h"
      #include "components/policy/core/browser/webui/policy_status_provider.h"
      #include "content/public/browser/browser_task_traits.h"
      #include "content/public/browser/browser_thread.h"
      #include "content/public/browser/web_contents.h"
      Aaron Teo . unresolved

      Please reorder the header files as shown below and format them using `git cl format`.

      ```suggestion
      #include "chrome/browser/policy/status_provider/updater_status_and_value_provider.h"

      #include <algorithm>
      #include <utility>

      #include "base/sequence_checker.h"
      #include "base/strings/utf_string_conversions.h"
      #include "base/task/task_traits.h"
      #include "base/task/thread_pool.h"
      #include "base/values.h"

      #include "build/build_config.h"
      #include "build/buildflag.h"
      #include "chrome/browser/google/google_update_policy_fetcher_common.h"
      #include "chrome/browser/policy/chrome_policy_conversions_client.h"
      #include "chrome/browser/profiles/profile.h"
      #include "components/policy/core/browser/policy_conversions.h"
      #include "components/policy/core/browser/webui/policy_status_provider.h"
      #include "content/public/browser/browser_task_traits.h"
      #include "content/public/browser/browser_thread.h"
      #include "content/public/browser/web_contents.h"

      #if BUILDFLAG(IS_MAC)
      #include "base/apple/foundation_util.h"
      #include "base/barrier_closure.h"
      #include "chrome/browser/updater/updater.h"

      #endif // BUILDFLAG(IS_MAC)

      #if BUILDFLAG(IS_WIN)
      #include <windows.h>
      #include <DSRole.h>

      #include "chrome/browser/google/google_update_policy_fetcher_win.h"
      #endif // BUILDFLAG(IS_WIN)
      ```

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Lance Bai
      • Noah Rose Ledesma
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I38a58db5e28a0d4b72744458660f43d3a72636f0
        Gerrit-Change-Number: 7828541
        Gerrit-PatchSet: 5
        Gerrit-Owner: Lance Bai <lanc...@gmail.com>
        Gerrit-Reviewer: Lance Bai <lanc...@gmail.com>
        Gerrit-Reviewer: Noah Rose Ledesma <noah...@google.com>
        Gerrit-CC: Aaron Teo <hoch...@chromium.org>
        Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
        Gerrit-Attention: Lance Bai <lanc...@gmail.com>
        Gerrit-Attention: Noah Rose Ledesma <noah...@google.com>
        Gerrit-Comment-Date: Sun, 10 May 2026 00:55:06 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Aaron Teo (Gerrit)

        unread,
        May 9, 2026, 8:56:29 PM (16 hours ago) May 9
        to Lance Bai, Noah Rose Ledesma, Chromium LUCI CQ, chromium...@chromium.org, Enterprise Policy Reviews
        Attention needed from Lance Bai and Noah Rose Ledesma

        Aaron Teo added 1 comment

        Commit Message
        Line 23, Patchset 5 (Latest):Change-Id: I38a58db5e28a0d4b72744458660f43d3a72636f0
        Bug: 507190427
        Aaron Teo . unresolved

        ```suggestion
        Bug: 507190427
        Change-Id: I38a58db5e28a0d4b72744458660f43d3a72636f0
        ```

        Gerrit-Comment-Date: Sun, 10 May 2026 00:56:01 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Lance Bai (Gerrit)

        unread,
        5:41 AM (7 hours ago) 5:41 AM
        to Noah Rose Ledesma, Aaron Teo, Chromium LUCI CQ, chromium...@chromium.org, Enterprise Policy Reviews
        Attention needed from Aaron Teo and Noah Rose Ledesma

        Lance Bai added 4 comments

        Commit Message
        Line 23, Patchset 5:Change-Id: I38a58db5e28a0d4b72744458660f43d3a72636f0
        Bug: 507190427
        Aaron Teo . unresolved

        ```suggestion
        Bug: 507190427
        Change-Id: I38a58db5e28a0d4b72744458660f43d3a72636f0
        ```

        Lance Bai

        not quite sure if that is caused by my manual editing the comment in the review web ui. I have done another `git cl upload`, hopefully it would be corrected.

        File chrome/browser/policy/BUILD.gn
        Line 814, Patchset 5: "status_provider/updater_status_and_value_provider.h",
        Aaron Teo . unresolved

        This appears to be a duplicate of line 806 above. If this file is necessary, perhaps we should modify the if condition here.

        Lance Bai

        I think you are right, I read the gn again, and is_chrome_branded is off by default,

        to verify the google policy update feature, some local work around like bellow is required.

        ```
        diff --git a/chrome/browser/policy/BUILD.gn b/chrome/browser/policy/BUILD.gn
        index 188a830c0e167..ac5a39e2d49b8 100644
        --- a/chrome/browser/policy/BUILD.gn
        +++ b/chrome/browser/policy/BUILD.gn
        @@ -808,7 +808,7 @@ source_set("policy") {
        public += [ "browser_dm_token_storage_mac.h" ]
        }

        - if (is_chrome_branded && (is_win || is_mac)) {
        + if (is_win || is_mac) {
        public += [ "status_provider/updater_status_and_value_provider.h" ]
        }

        @@ -1137,7 +1137,7 @@ source_set("impl") {
        sources += [ "browser_dm_token_storage_mac.mm" ]
        }

        - if (is_chrome_branded && (is_win || is_mac)) {
        + if (is_win || is_mac) {
        sources += [ "status_provider/updater_status_and_value_provider.cc" ]
        }

        diff --git a/chrome/browser/policy/policy_value_and_status_aggregator.cc b/chrome/browser/policy/policy_value_and_status_aggregator.cc
        index ace06ec924272..3e3eee78e6941 100644
        --- a/chrome/browser/policy/policy_value_and_status_aggregator.cc
        +++ b/chrome/browser/policy/policy_value_and_status_aggregator.cc
        @@ -43,11 +43,9 @@
        #include "components/prefs/pref_service.h"
        #endif // BUILDFLAG(IS_CHROMEOS)

        -#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)) && \
        - BUILDFLAG(GOOGLE_CHROME_BRANDING)
        +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
        #include "chrome/browser/policy/status_provider/updater_status_and_value_provider.h"
        -#endif // (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)) &&
        - // BUILDFLAG(GOOGLE_CHROME_BRANDING)
        +#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)

        #if BUILDFLAG(ENABLE_EXTENSIONS_CORE)
        #include "chrome/browser/policy/cloud/extension_install_policy_service_factory.h"
        @@ -150,11 +148,9 @@ const char kDeviceStatusKey[] = "device";
        constexpr char kMachineStatusKey[] = "machine";
        #endif // !BUILDFLAG(IS_CHROMEOS)

        -#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)) && \
        - BUILDFLAG(GOOGLE_CHROME_BRANDING)
        +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
        constexpr char kUpdaterStatusKey[] = "updater";
        -#endif // (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)) &&
        - // BUILDFLAG(GOOGLE_CHROME_BRANDING)
        +#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)

        std::unique_ptr<PolicyValueAndStatusAggregator>
        PolicyValueAndStatusAggregator::CreateDefaultPolicyValueAndStatusAggregator(
        @@ -214,13 +210,11 @@ PolicyValueAndStatusAggregator::CreateDefaultPolicyValueAndStatusAggregator(
        #endif // !BUILDFLAG(IS_CHROMEOS)

        // Updater policies.
        -#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)) && \
        - BUILDFLAG(GOOGLE_CHROME_BRANDING)
        +#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
        aggregator->AddPolicyStatusAndValueProvider(
        kUpdaterStatusKey,
        std::make_unique<UpdaterStatusAndValueProvider>(profile));
        -#endif // (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)) &&
        - // BUILDFLAG(GOOGLE_CHROME_BRANDING)
        +#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
        return aggregator;
        }

        ```

        Line 1146, Patchset 5: "status_provider/updater_status_and_value_provider.cc",
        Aaron Teo . resolved

        Similar to the previous comment.

        Lance Bai

        Done

        File chrome/browser/policy/status_provider/updater_status_and_value_provider.cc
        Line 5, Patchset 5:#include "chrome/browser/policy/status_provider/updater_status_and_value_provider.h"
        Lance Bai

        somehow, `git cl format` does not sort the include headers

        I reorder it with the standard headers, then project headers, followed by the platform-specific #if,
        let me know if there is anything need to be adjusted

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Aaron Teo
        • Noah Rose Ledesma
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I38a58db5e28a0d4b72744458660f43d3a72636f0
        Gerrit-Change-Number: 7828541
        Gerrit-PatchSet: 6
        Gerrit-Owner: Lance Bai <lanc...@gmail.com>
        Gerrit-Reviewer: Lance Bai <lanc...@gmail.com>
        Gerrit-Reviewer: Noah Rose Ledesma <noah...@google.com>
        Gerrit-CC: Aaron Teo <hoch...@chromium.org>
        Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
        Gerrit-Attention: Aaron Teo <hoch...@chromium.org>
        Gerrit-Attention: Noah Rose Ledesma <noah...@google.com>
        Gerrit-Comment-Date: Sun, 10 May 2026 09:40:49 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Aaron Teo <hoch...@chromium.org>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        gwsq (Gerrit)

        unread,
        5:45 AM (7 hours ago) 5:45 AM
        to Lance Bai, Enterprise Policy Reviews, Pavol Marko, Noah Rose Ledesma, Aaron Teo, Chromium LUCI CQ, chromium...@chromium.org
        Attention needed from Aaron Teo, Noah Rose Ledesma and Pavol Marko

        Message from gwsq

        Reviewer source(s):
        pma...@chromium.org is from context(chrome/enterprise/gwsq/enterprise-policy-review.gwsq)

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Aaron Teo
        • Noah Rose Ledesma
        • Pavol Marko
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I38a58db5e28a0d4b72744458660f43d3a72636f0
        Gerrit-Change-Number: 7828541
        Gerrit-PatchSet: 6
        Gerrit-Owner: Lance Bai <lanc...@gmail.com>
        Gerrit-Reviewer: Lance Bai <lanc...@gmail.com>
        Gerrit-Reviewer: Noah Rose Ledesma <noah...@google.com>
        Gerrit-Reviewer: Pavol Marko <pma...@chromium.org>
        Gerrit-CC: Aaron Teo <hoch...@chromium.org>
        Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
        Gerrit-CC: gwsq
        Gerrit-Attention: Pavol Marko <pma...@chromium.org>
        Gerrit-Attention: Aaron Teo <hoch...@chromium.org>
        Gerrit-Attention: Noah Rose Ledesma <noah...@google.com>
        Gerrit-Comment-Date: Sun, 10 May 2026 09:45:19 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Aaron Teo (Gerrit)

        unread,
        6:37 AM (6 hours ago) 6:37 AM
        to Lance Bai, Enterprise Policy Reviews, Pavol Marko, Noah Rose Ledesma, Chromium LUCI CQ, chromium...@chromium.org
        Attention needed from Lance Bai, Noah Rose Ledesma and Pavol Marko

        Aaron Teo added 4 comments

        Commit Message
        Line 23, Patchset 5:Change-Id: I38a58db5e28a0d4b72744458660f43d3a72636f0
        Bug: 507190427
        Aaron Teo . resolved

        ```suggestion
        Bug: 507190427
        Change-Id: I38a58db5e28a0d4b72744458660f43d3a72636f0
        ```

        Lance Bai

        not quite sure if that is caused by my manual editing the comment in the review web ui. I have done another `git cl upload`, hopefully it would be corrected.

        Aaron Teo

        Done

        File chrome/browser/policy/BUILD.gn
        Aaron Teo

        In this case, the file appears to only be compiled on Windows and macOS versions with the Google brand; in other words, this will cause Chromium builds to not compile the file.

        The same applies to .cc files.

        File chrome/browser/policy/status_provider/updater_status_and_value_provider.cc
        Line 34, Patchset 7 (Latest):
        Aaron Teo . unresolved

        Was the blank line on line 34 added by `git cl format`?

        Aaron Teo . resolved
        Aaron Teo

        Done

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Lance Bai
        • Noah Rose Ledesma
        • Pavol Marko
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I38a58db5e28a0d4b72744458660f43d3a72636f0
        Gerrit-Change-Number: 7828541
        Gerrit-PatchSet: 7
        Gerrit-Owner: Lance Bai <lanc...@gmail.com>
        Gerrit-Reviewer: Lance Bai <lanc...@gmail.com>
        Gerrit-Reviewer: Noah Rose Ledesma <noah...@google.com>
        Gerrit-Reviewer: Pavol Marko <pma...@chromium.org>
        Gerrit-CC: Aaron Teo <hoch...@chromium.org>
        Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
        Gerrit-CC: gwsq
        Gerrit-Attention: Pavol Marko <pma...@chromium.org>
        Gerrit-Attention: Lance Bai <lanc...@gmail.com>
        Gerrit-Attention: Noah Rose Ledesma <noah...@google.com>
        Gerrit-Comment-Date: Sun, 10 May 2026 10:36:43 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Lance Bai (Gerrit)

        unread,
        6:50 AM (6 hours ago) 6:50 AM
        to Enterprise Policy Reviews, Pavol Marko, Noah Rose Ledesma, Aaron Teo, Chromium LUCI CQ, chromium...@chromium.org
        Attention needed from Lance Bai, Noah Rose Ledesma and Pavol Marko

        Lance Bai added 4 comments

        Commit Message
        Line 23, Patchset 5:Change-Id: I38a58db5e28a0d4b72744458660f43d3a72636f0
        Bug: 507190427
        Aaron Teo . resolved

        ```suggestion
        Bug: 507190427
        Change-Id: I38a58db5e28a0d4b72744458660f43d3a72636f0
        ```

        Lance Bai

        not quite sure if that is caused by my manual editing the comment in the review web ui. I have done another `git cl upload`, hopefully it would be corrected.

        Lance Bai

        Done

        File chrome/browser/policy/BUILD.gn
        Line 814, Patchset 5: "status_provider/updater_status_and_value_provider.h",
        Aaron Teo . resolved
        Lance Bai

        Done

        File chrome/browser/policy/status_provider/updater_status_and_value_provider.cc
        Aaron Teo . unresolved

        Was the blank line on line 34 added by `git cl format`?

        Lance Bai

        it is.

        Lance Bai

        Marked as resolved.

        Gerrit-Comment-Date: Sun, 10 May 2026 10:49:52 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Aaron Teo (Gerrit)

        unread,
        7:20 AM (6 hours ago) 7:20 AM
        to Lance Bai, Enterprise Policy Reviews, Pavol Marko, Noah Rose Ledesma, Chromium LUCI CQ, chromium...@chromium.org
        Attention needed from Lance Bai, Noah Rose Ledesma and Pavol Marko

        Aaron Teo added 2 comments

        File chrome/browser/policy/BUILD.gn
        Line 814, Patchset 5: "status_provider/updater_status_and_value_provider.h",
        Aaron Teo . unresolved
        Aaron Teo

        It seems we still need to consider the Chromium builds?

        File chrome/browser/policy/status_provider/updater_status_and_value_provider.cc
        Line 34, Patchset 7:
        Aaron Teo . resolved

        Was the blank line on line 34 added by `git cl format`?

        Lance Bai

        it is.

        Aaron Teo

        Acknowledged

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Lance Bai
        • Noah Rose Ledesma
        • Pavol Marko
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I38a58db5e28a0d4b72744458660f43d3a72636f0
        Gerrit-Change-Number: 7828541
        Gerrit-PatchSet: 8
        Gerrit-Owner: Lance Bai <lanc...@gmail.com>
        Gerrit-Reviewer: Lance Bai <lanc...@gmail.com>
        Gerrit-Reviewer: Noah Rose Ledesma <noah...@google.com>
        Gerrit-Reviewer: Pavol Marko <pma...@chromium.org>
        Gerrit-CC: Aaron Teo <hoch...@chromium.org>
        Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
        Gerrit-CC: gwsq
        Gerrit-Attention: Pavol Marko <pma...@chromium.org>
        Gerrit-Attention: Lance Bai <lanc...@gmail.com>
        Gerrit-Attention: Noah Rose Ledesma <noah...@google.com>
        Gerrit-Comment-Date: Sun, 10 May 2026 11:20:03 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Lance Bai (Gerrit)

        unread,
        11:22 AM (2 hours ago) 11:22 AM
        to Enterprise Policy Reviews, Pavol Marko, Noah Rose Ledesma, Aaron Teo, Chromium LUCI CQ, chromium...@chromium.org
        Attention needed from Aaron Teo, Noah Rose Ledesma and Pavol Marko

        Lance Bai added 1 comment

        File chrome/browser/policy/BUILD.gn
        Lance Bai

        the original BUILD.gn is

        ```
        if (is_win) {
        public += [ "browser_dm_token_storage_win.h" ]
             if (is_chrome_branded) {
        public += [ "status_provider/updater_status_and_value_provider.h" ]
        }
        }
        ```

        updater_status_and_value_provider is intended to be not compiled in the chromium build (since is_chrome_branded is false),

        my last update guard the condition with

        ```

        if (is_chrome_branded && (is_win || is_mac)) {
            public += [ "status_provider/updater_status_and_value_provider.h" ]
        }
        ```
        that should align with the original logic, and extend the feature on the mac platfrom.

        let me know if I am missing anything.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Aaron Teo
        • Noah Rose Ledesma
        • Pavol Marko
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement is not satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I38a58db5e28a0d4b72744458660f43d3a72636f0
        Gerrit-Change-Number: 7828541
        Gerrit-PatchSet: 9
        Gerrit-Owner: Lance Bai <lanc...@gmail.com>
        Gerrit-Reviewer: Lance Bai <lanc...@gmail.com>
        Gerrit-Reviewer: Noah Rose Ledesma <noah...@google.com>
        Gerrit-Reviewer: Pavol Marko <pma...@chromium.org>
        Gerrit-CC: Aaron Teo <hoch...@chromium.org>
        Gerrit-CC: Enterprise Policy Reviews <enterprise-p...@google.com>
        Gerrit-CC: gwsq
        Gerrit-Attention: Pavol Marko <pma...@chromium.org>
        Gerrit-Attention: Aaron Teo <hoch...@chromium.org>
        Gerrit-Attention: Noah Rose Ledesma <noah...@google.com>
        Gerrit-Comment-Date: Sun, 10 May 2026 15:22:23 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages