[Extensions]: Add enterprise.policy API [chromium/src : main]

0 views
Skip to first unread message

Devlin Cronin (Gerrit)

unread,
Mar 19, 2026, 7:05:06 PMMar 19
to Patrick Kettner, Mirko Bonadei, Jerome Jiang, AyeAye, Chromium Metrics Reviews, chromium...@chromium.org, Kelvin Jiang, Code Review Nudger, Devlin Cronin, Chromium LUCI CQ, ortuno...@chromium.org, net-r...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, browser-comp...@chromium.org, jshin...@chromium.org, mfoltz+wa...@chromium.org, oshima...@chromium.org, titoua...@chromium.org, chromotin...@chromium.org, fgal...@chromium.org, dewitt...@chromium.org, chrome-intell...@chromium.org, jz...@chromium.org, cblume...@chromium.org, grt+...@chromium.org, eme-r...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, feature-me...@chromium.org, asvitkine...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, ipc-securi...@chromium.org, srahim...@chromium.org
Attention needed from Kelvin Jiang and Patrick Kettner

Devlin Cronin added 7 comments

Patchset-level comments
File-level comment, Patchset 39 (Latest):
Devlin Cronin . resolved

Thanks, Patrick! This is getting close!

File chrome/browser/BUILD.gn
Line 7354, Patchset 39 (Latest): "extensions/api/enterprise_policy/enterprise_policy_api.cc",
Devlin Cronin . unresolved

We shouldn't put these here -- if _absolutely necessary_, we could put them in a target of //chrome/browser/extensions/BUILD.gn, but it'd be much better to have them have their own target, which is then included in //chrome/browser/extensions/api/BUILD.gn. It looks like this is what you had [here](https://crrev.com/c/7030621/29/chrome/browser/extensions/api/BUILD.gn) -- does that still work?

File chrome/browser/extensions/api/enterprise_policy/enterprise_policy_api.h
Line 15, Patchset 39 (Latest): ENTERPRISE_POLICY_GETPOLICIES)
Devlin Cronin . unresolved

nit: no underscore here -- they should be NAMESPACE_METHODNAME, so ENTERPRISEPOLICY_GETPOLICIES.

Ditto below

File chrome/browser/extensions/api/enterprise_policy/enterprise_policy_api_unittest.cc
Line 86, Patchset 39 (Latest):TEST_F(EnterprisePolicyApiUnittest, UploadReport_Success) {
Devlin Cronin . unresolved

is there any way we can validate that it uploaded the report?

File chrome/browser/extensions/chrome_extensions_browser_client.h
Line 243, Patchset 39 (Latest):
Devlin Cronin . unresolved

rm \n

File chrome/browser/extensions/chrome_extensions_browser_client.cc
Line 11, Patchset 39 (Latest):#include "base/barrier_closure.h"
Devlin Cronin . unresolved

nit: not needed

File chrome/common/extensions/api/enterprise_policy.webidl
Line 16, Patchset 39 (Latest): // @return A promise that resolves when the report has successfully uploaded.
Devlin Cronin . unresolved

nit: this is the wrong comment syntax (it's correct above)

Open in Gerrit

Related details

Attention is currently required from:
  • Kelvin Jiang
  • Patrick Kettner
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: I2e700af6203e366c70b303b8e28967c948e1b2f8
Gerrit-Change-Number: 7030621
Gerrit-PatchSet: 39
Gerrit-Owner: Patrick Kettner <patrick...@google.com>
Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-Reviewer: Kelvin Jiang <kelvi...@chromium.org>
Gerrit-Reviewer: Patrick Kettner <patrick...@google.com>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-CC: Jerome Jiang <ji...@chromium.org>
Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
Gerrit-Attention: Kelvin Jiang <kelvi...@chromium.org>
Gerrit-Attention: Patrick Kettner <patrick...@google.com>
Gerrit-Comment-Date: Thu, 19 Mar 2026 23:04:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Patrick Kettner (Gerrit)

unread,
Mar 20, 2026, 8:54:52 PMMar 20
to Mirko Bonadei, Jerome Jiang, AyeAye, Chromium Metrics Reviews, chromium...@chromium.org, Kelvin Jiang, Code Review Nudger, Devlin Cronin, Chromium LUCI CQ, ortuno...@chromium.org, net-r...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, browser-comp...@chromium.org, jshin...@chromium.org, mfoltz+wa...@chromium.org, oshima...@chromium.org, titoua...@chromium.org, chromotin...@chromium.org, fgal...@chromium.org, dewitt...@chromium.org, chrome-intell...@chromium.org, jz...@chromium.org, cblume...@chromium.org, grt+...@chromium.org, eme-r...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, feature-me...@chromium.org, asvitkine...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, ipc-securi...@chromium.org, srahim...@chromium.org
Attention needed from Devlin Cronin

Patrick Kettner added 6 comments

File chrome/browser/BUILD.gn
Line 7354, Patchset 39: "extensions/api/enterprise_policy/enterprise_policy_api.cc",
Devlin Cronin . resolved

We shouldn't put these here -- if _absolutely necessary_, we could put them in a target of //chrome/browser/extensions/BUILD.gn, but it'd be much better to have them have their own target, which is then included in //chrome/browser/extensions/api/BUILD.gn. It looks like this is what you had [here](https://crrev.com/c/7030621/29/chrome/browser/extensions/api/BUILD.gn) -- does that still work?

Patrick Kettner

Done

File chrome/browser/extensions/api/enterprise_policy/enterprise_policy_api.h
Line 15, Patchset 39: ENTERPRISE_POLICY_GETPOLICIES)
Devlin Cronin . resolved

nit: no underscore here -- they should be NAMESPACE_METHODNAME, so ENTERPRISEPOLICY_GETPOLICIES.

Ditto below

Patrick Kettner

Acknowledged

File chrome/browser/extensions/api/enterprise_policy/enterprise_policy_api_unittest.cc
Line 86, Patchset 39:TEST_F(EnterprisePolicyApiUnittest, UploadReport_Success) {
Devlin Cronin . unresolved

is there any way we can validate that it uploaded the report?

Patrick Kettner

I dont think so (at least as far as I can tell). I am reusing the existing `UploadFullReport`, and as far as I am able to reason it only takes a completion closure and doesn't pass back a status for the actual upload. It "succeeds" as long as it triggers the process. I assume that adding anything would require work on the server side?

File chrome/browser/extensions/chrome_extensions_browser_client.h
Line 243, Patchset 39:
Devlin Cronin . resolved

rm \n

Patrick Kettner

Done

File chrome/browser/extensions/chrome_extensions_browser_client.cc
Line 11, Patchset 39:#include "base/barrier_closure.h"
Devlin Cronin . resolved

nit: not needed

Patrick Kettner

Done

File chrome/common/extensions/api/enterprise_policy.webidl
Line 16, Patchset 39: // @return A promise that resolves when the report has successfully uploaded.
Devlin Cronin . resolved

nit: this is the wrong comment syntax (it's correct above)

Patrick Kettner

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Devlin Cronin
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: I2e700af6203e366c70b303b8e28967c948e1b2f8
Gerrit-Change-Number: 7030621
Gerrit-PatchSet: 44
Gerrit-Owner: Patrick Kettner <patrick...@google.com>
Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-Reviewer: Kelvin Jiang <kelvi...@chromium.org>
Gerrit-Reviewer: Patrick Kettner <patrick...@google.com>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-CC: Jerome Jiang <ji...@chromium.org>
Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
Gerrit-Attention: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-Comment-Date: Sat, 21 Mar 2026 00:54:46 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Devlin Cronin <rdevlin...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Devlin Cronin (Gerrit)

unread,
Mar 23, 2026, 8:05:52 PMMar 23
to Patrick Kettner, Mirko Bonadei, Jerome Jiang, AyeAye, Chromium Metrics Reviews, chromium...@chromium.org, Kelvin Jiang, Code Review Nudger, Devlin Cronin, Chromium LUCI CQ, ortuno...@chromium.org, net-r...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, browser-comp...@chromium.org, jshin...@chromium.org, mfoltz+wa...@chromium.org, oshima...@chromium.org, titoua...@chromium.org, chromotin...@chromium.org, fgal...@chromium.org, dewitt...@chromium.org, chrome-intell...@chromium.org, jz...@chromium.org, cblume...@chromium.org, grt+...@chromium.org, eme-r...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, feature-me...@chromium.org, asvitkine...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, ipc-securi...@chromium.org, srahim...@chromium.org
Attention needed from Kelvin Jiang and Patrick Kettner

Devlin Cronin added 4 comments

Patchset-level comments
File-level comment, Patchset 44 (Latest):
Devlin Cronin . resolved

Thanks, Patrick! But it looks like some of these comments weren't addressed?

File chrome/browser/BUILD.gn
Line 7354, Patchset 39: "extensions/api/enterprise_policy/enterprise_policy_api.cc",
Devlin Cronin . unresolved

We shouldn't put these here -- if _absolutely necessary_, we could put them in a target of //chrome/browser/extensions/BUILD.gn, but it'd be much better to have them have their own target, which is then included in //chrome/browser/extensions/api/BUILD.gn. It looks like this is what you had [here](https://crrev.com/c/7030621/29/chrome/browser/extensions/api/BUILD.gn) -- does that still work?

Patrick Kettner

Done

Devlin Cronin

It doesn't look like this one was done?

File chrome/browser/extensions/api/enterprise_policy/enterprise_policy_api.h
Line 15, Patchset 39: ENTERPRISE_POLICY_GETPOLICIES)
Devlin Cronin . unresolved

nit: no underscore here -- they should be NAMESPACE_METHODNAME, so ENTERPRISEPOLICY_GETPOLICIES.

Ditto below

Patrick Kettner

Acknowledged

Devlin Cronin

Doesn't look like this was addressed?

File chrome/browser/extensions/api/enterprise_policy/enterprise_policy_api_unittest.cc
Line 86, Patchset 39:TEST_F(EnterprisePolicyApiUnittest, UploadReport_Success) {
Devlin Cronin . unresolved

is there any way we can validate that it uploaded the report?

Patrick Kettner

I dont think so (at least as far as I can tell). I am reusing the existing `UploadFullReport`, and as far as I am able to reason it only takes a completion closure and doesn't pass back a status for the actual upload. It "succeeds" as long as it triggers the process. I assume that adding anything would require work on the server side?

Devlin Cronin

I'm not so much suggesting we test the full end-to-end flow with a "real" report upload, but rather that we check that we (at least attempted to) trigger the report upload. Right now, if we replaced the body of the function with just "RespondNow(NoArguments())", this test would still pass.

It looks like a few unit tests use the [last upload time](https://source.chromium.org/chromium/chromium/src/+/main:components/enterprise/browser/reporting/common_pref_names.cc;l=20;drc=5cfe525024bc42f5433fff03ee62998590268c2b) preference to check that a report was uploaded; perhaps that would work?

Open in Gerrit

Related details

Attention is currently required from:
  • Kelvin Jiang
  • Patrick Kettner
Gerrit-Attention: Kelvin Jiang <kelvi...@chromium.org>
Gerrit-Attention: Patrick Kettner <patrick...@google.com>
Gerrit-Comment-Date: Tue, 24 Mar 2026 00:05:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Devlin Cronin <rdevlin...@chromium.org>
Comment-In-Reply-To: Patrick Kettner <patrick...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Kelvin Jiang (Gerrit)

unread,
Mar 26, 2026, 4:00:31 AMMar 26
to Patrick Kettner, Mirko Bonadei, Jerome Jiang, AyeAye, Chromium Metrics Reviews, chromium...@chromium.org, Code Review Nudger, Devlin Cronin, Chromium LUCI CQ, ortuno...@chromium.org, net-r...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, browser-comp...@chromium.org, jshin...@chromium.org, mfoltz+wa...@chromium.org, oshima...@chromium.org, titoua...@chromium.org, chromotin...@chromium.org, fgal...@chromium.org, dewitt...@chromium.org, chrome-intell...@chromium.org, jz...@chromium.org, cblume...@chromium.org, grt+...@chromium.org, eme-r...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, feature-me...@chromium.org, asvitkine...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, ipc-securi...@chromium.org, srahim...@chromium.org
Attention needed from Patrick Kettner

Kelvin Jiang added 7 comments

Patchset-level comments
Kelvin Jiang . resolved

Thanks Patrick!

Commit Message
Line 27, Patchset 44 (Latest):Fixed: 7030621
Kelvin Jiang . unresolved

Please fix this WARNING reported by Commit Message Validation: Did you intend to reference an old bug id? Please ensure this is a valid Buganiz...

Did you intend to reference an old bug id? Please ensure this is a valid Buganizer ID and not an external system such as Monorail.

File chrome/browser/extensions/api/BUILD.gn
Line 69, Patchset 44 (Latest):
Kelvin Jiang . unresolved

nit: remove extra newline

File chrome/browser/extensions/api/enterprise_policy/BUILD.gn
Line 10, Patchset 44 (Latest):
Kelvin Jiang . unresolved

extra newline

File chrome/browser/extensions/api/enterprise_policy/enterprise_policy_api.h
Line 15, Patchset 39: ENTERPRISE_POLICY_GETPOLICIES)
Devlin Cronin . unresolved

nit: no underscore here -- they should be NAMESPACE_METHODNAME, so ENTERPRISEPOLICY_GETPOLICIES.

Ditto below

Patrick Kettner

Acknowledged

Devlin Cronin

Doesn't look like this was addressed?

Kelvin Jiang

(now it is) @Patrick please resolve comments when the relevant code is updated

File chrome/browser/extensions/api/enterprise_policy/enterprise_policy_api.cc
Line 76, Patchset 44 (Latest):#endif
Kelvin Jiang . unresolved

nit: `#endif // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS)`

File chrome/browser/extensions/api/enterprise_policy/enterprise_policy_api_unittest.cc
Line 67, Patchset 44 (Latest):#else // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
Kelvin Jiang . unresolved

nit: extra space here

Open in Gerrit

Related details

Attention is currently required from:
  • Patrick Kettner
Gerrit-Attention: Patrick Kettner <patrick...@google.com>
Gerrit-Comment-Date: Thu, 26 Mar 2026 08:00:20 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Patrick Kettner (Gerrit)

unread,
Mar 30, 2026, 11:00:49 AMMar 30
to Mirko Bonadei, Jerome Jiang, AyeAye, Chromium Metrics Reviews, chromium...@chromium.org, Kelvin Jiang, Code Review Nudger, Devlin Cronin, Chromium LUCI CQ, ortuno...@chromium.org, net-r...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, browser-comp...@chromium.org, jshin...@chromium.org, mfoltz+wa...@chromium.org, oshima...@chromium.org, titoua...@chromium.org, chromotin...@chromium.org, fgal...@chromium.org, dewitt...@chromium.org, chrome-intell...@chromium.org, jz...@chromium.org, cblume...@chromium.org, grt+...@chromium.org, eme-r...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, feature-me...@chromium.org, asvitkine...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, ipc-securi...@chromium.org, srahim...@chromium.org

Patrick Kettner added 7 comments

Commit Message
Line 27, Patchset 44:Fixed: 7030621
Kelvin Jiang . resolved

Please fix this WARNING reported by Commit Message Validation: Did you intend to reference an old bug id? Please ensure this is a valid Buganiz...

Did you intend to reference an old bug id? Please ensure this is a valid Buganizer ID and not an external system such as Monorail.

Patrick Kettner

Done

File chrome/browser/BUILD.gn
Line 7354, Patchset 39: "extensions/api/enterprise_policy/enterprise_policy_api.cc",
Devlin Cronin . resolved

We shouldn't put these here -- if _absolutely necessary_, we could put them in a target of //chrome/browser/extensions/BUILD.gn, but it'd be much better to have them have their own target, which is then included in //chrome/browser/extensions/api/BUILD.gn. It looks like this is what you had [here](https://crrev.com/c/7030621/29/chrome/browser/extensions/api/BUILD.gn) -- does that still work?

Patrick Kettner

Done

Devlin Cronin

It doesn't look like this one was done?

Patrick Kettner

Sorry about that, I must have screwed up a rebase and lost the change. I moved the definitions to a new target in //chrome/browser/extensions/api/enterprise_policy/BUILD.gn and depend on it from //chrome/browser/extensions/api/BUILD.gn

File chrome/browser/extensions/api/enterprise_policy/BUILD.gn
Line 10, Patchset 44:
Kelvin Jiang . resolved

extra newline

Patrick Kettner

Done

File chrome/browser/extensions/api/enterprise_policy/enterprise_policy_api.h
Line 15, Patchset 39: ENTERPRISE_POLICY_GETPOLICIES)
Devlin Cronin . resolved

nit: no underscore here -- they should be NAMESPACE_METHODNAME, so ENTERPRISEPOLICY_GETPOLICIES.

Ditto below

Patrick Kettner

Acknowledged

Devlin Cronin

Doesn't look like this was addressed?

Kelvin Jiang

(now it is) @Patrick please resolve comments when the relevant code is updated

Patrick Kettner

Done

File chrome/browser/extensions/api/enterprise_policy/enterprise_policy_api.cc
Line 76, Patchset 44:#endif
Kelvin Jiang . resolved

nit: `#endif // BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_CHROMEOS)`

Patrick Kettner

Done

File chrome/browser/extensions/api/enterprise_policy/enterprise_policy_api_unittest.cc
Line 67, Patchset 44:#else // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
Kelvin Jiang . resolved

nit: extra space here

Patrick Kettner

Done

Line 86, Patchset 39:TEST_F(EnterprisePolicyApiUnittest, UploadReport_Success) {
Devlin Cronin . unresolved

is there any way we can validate that it uploaded the report?

Patrick Kettner

I dont think so (at least as far as I can tell). I am reusing the existing `UploadFullReport`, and as far as I am able to reason it only takes a completion closure and doesn't pass back a status for the actual upload. It "succeeds" as long as it triggers the process. I assume that adding anything would require work on the server side?

Devlin Cronin

I'm not so much suggesting we test the full end-to-end flow with a "real" report upload, but rather that we check that we (at least attempted to) trigger the report upload. Right now, if we replaced the body of the function with just "RespondNow(NoArguments())", this test would still pass.

It looks like a few unit tests use the [last upload time](https://source.chromium.org/chromium/chromium/src/+/main:components/enterprise/browser/reporting/common_pref_names.cc;l=20;drc=5cfe525024bc42f5433fff03ee62998590268c2b) preference to check that a report was uploaded; perhaps that would work?

Patrick Kettner

I updated the test setup to init CloudProfileReportingService and flush it's tasks. WDYT?

Open in Gerrit

Related details

Attention set is empty
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: I2e700af6203e366c70b303b8e28967c948e1b2f8
Gerrit-Change-Number: 7030621
Gerrit-PatchSet: 47
Gerrit-Owner: Patrick Kettner <patrick...@google.com>
Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-Reviewer: Kelvin Jiang <kelvi...@chromium.org>
Gerrit-Reviewer: Patrick Kettner <patrick...@google.com>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-CC: Jerome Jiang <ji...@chromium.org>
Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
Gerrit-Comment-Date: Mon, 30 Mar 2026 15:00:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Devlin Cronin <rdevlin...@chromium.org>
Comment-In-Reply-To: Kelvin Jiang <kelvi...@chromium.org>
Comment-In-Reply-To: Patrick Kettner <patrick...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Patrick Kettner (Gerrit)

unread,
Mar 30, 2026, 2:02:30 PMMar 30
to Mirko Bonadei, Jerome Jiang, AyeAye, Chromium Metrics Reviews, chromium...@chromium.org, Kelvin Jiang, Code Review Nudger, Devlin Cronin, Chromium LUCI CQ, ortuno...@chromium.org, net-r...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, browser-comp...@chromium.org, jshin...@chromium.org, mfoltz+wa...@chromium.org, oshima...@chromium.org, titoua...@chromium.org, chromotin...@chromium.org, fgal...@chromium.org, dewitt...@chromium.org, chrome-intell...@chromium.org, jz...@chromium.org, cblume...@chromium.org, grt+...@chromium.org, eme-r...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, feature-me...@chromium.org, asvitkine...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, ipc-securi...@chromium.org, srahim...@chromium.org
Attention needed from Devlin Cronin and Kelvin Jiang

Patrick Kettner added 1 comment

File chrome/browser/extensions/api/BUILD.gn
Line 69, Patchset 44:
Kelvin Jiang . resolved

nit: remove extra newline

Patrick Kettner

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Devlin Cronin
  • Kelvin Jiang
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: I2e700af6203e366c70b303b8e28967c948e1b2f8
Gerrit-Change-Number: 7030621
Gerrit-PatchSet: 51
Gerrit-Owner: Patrick Kettner <patrick...@google.com>
Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-Reviewer: Kelvin Jiang <kelvi...@chromium.org>
Gerrit-Reviewer: Patrick Kettner <patrick...@google.com>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-CC: Jerome Jiang <ji...@chromium.org>
Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
Gerrit-Attention: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-Attention: Kelvin Jiang <kelvi...@chromium.org>
Gerrit-Comment-Date: Mon, 30 Mar 2026 18:02:23 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Kelvin Jiang <kelvi...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Kelvin Jiang (Gerrit)

unread,
Apr 3, 2026, 6:33:27 AMApr 3
to Patrick Kettner, Mirko Bonadei, Jerome Jiang, AyeAye, Chromium Metrics Reviews, chromium...@chromium.org, Code Review Nudger, Devlin Cronin, Chromium LUCI CQ, ortuno...@chromium.org, net-r...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, browser-comp...@chromium.org, jshin...@chromium.org, mfoltz+wa...@chromium.org, oshima...@chromium.org, titoua...@chromium.org, chromotin...@chromium.org, fgal...@chromium.org, dewitt...@chromium.org, chrome-intell...@chromium.org, jz...@chromium.org, cblume...@chromium.org, grt+...@chromium.org, eme-r...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, feature-me...@chromium.org, asvitkine...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, ipc-securi...@chromium.org, srahim...@chromium.org
Attention needed from Devlin Cronin and Patrick Kettner

Kelvin Jiang added 2 comments

File chrome/browser/extensions/api/enterprise_policy/enterprise_policy_api_unittest.cc
Line 63, Patchset 51 (Latest): // The dispatcher forwards calls to the an API function.
Kelvin Jiang . unresolved

not sure what this sentence is supposed to say

Line 64, Patchset 51 (Latest): dispatcher_ = std::make_unique<ExtensionFunctionDispatcher>(profile());
Kelvin Jiang . unresolved

I don't see this being used in the test?

Open in Gerrit

Related details

Attention is currently required from:
  • Devlin Cronin
  • Patrick Kettner
Gerrit-Attention: Patrick Kettner <patrick...@google.com>
Gerrit-Comment-Date: Fri, 03 Apr 2026 10:33:15 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Kelvin Jiang (Gerrit)

unread,
Apr 8, 2026, 5:43:11 PMApr 8
to Patrick Kettner, Mirko Bonadei, Jerome Jiang, AyeAye, Chromium Metrics Reviews, chromium...@chromium.org, Code Review Nudger, Devlin Cronin, Chromium LUCI CQ, ortuno...@chromium.org, net-r...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, browser-comp...@chromium.org, jshin...@chromium.org, mfoltz+wa...@chromium.org, oshima...@chromium.org, titoua...@chromium.org, chromotin...@chromium.org, fgal...@chromium.org, dewitt...@chromium.org, chrome-intell...@chromium.org, jz...@chromium.org, cblume...@chromium.org, grt+...@chromium.org, eme-r...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, feature-me...@chromium.org, asvitkine...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, ipc-securi...@chromium.org, srahim...@chromium.org
Attention needed from Devlin Cronin and Patrick Kettner

Kelvin Jiang added 1 comment

Patchset-level comments
File-level comment, Patchset 51 (Latest):
Kelvin Jiang . resolved

Hey Patrick could you do a fresh pull and resolve merge conflicts? then let's try to get a dry run to pass before continuing with review

Gerrit-Comment-Date: Wed, 08 Apr 2026 21:43:01 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Devlin Cronin (Gerrit)

unread,
Apr 10, 2026, 6:02:43 AMApr 10
to Patrick Kettner, Kelvin Jiang, Mirko Bonadei, Jerome Jiang, android-bu...@system.gserviceaccount.com, Chromium Metrics Reviews, chromium...@chromium.org, Code Review Nudger, Devlin Cronin, Chromium LUCI CQ, ortuno...@chromium.org, net-r...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, browser-comp...@chromium.org, jshin...@chromium.org, mfoltz+wa...@chromium.org, oshima...@chromium.org, titoua...@chromium.org, chromotin...@chromium.org, fgal...@chromium.org, dewitt...@chromium.org, chrome-intell...@chromium.org, jz...@chromium.org, cblume...@chromium.org, grt+...@chromium.org, eme-r...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, feature-me...@chromium.org, asvitkine...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, ipc-securi...@chromium.org, srahim...@chromium.org
Attention needed from Patrick Kettner

Devlin Cronin added 11 comments

Patchset-level comments
Devlin Cronin . unresolved

Thanks, Patrick!

For CLs, please also make sure you do a "self-review" when uploading a new patch set to make sure all comments are addressed and all changes are intentional and necessary -- that can help catch some of these cases of unintentional changes or bad merge resolutions.

File chrome/browser/BUILD.gn
Line 7304, Patchset 51 (Latest): "guest_view/app_view/chrome_app_view_guest_delegate.cc",
Devlin Cronin . unresolved

why these changes? They seem very unrelated to this work

File chrome/browser/extensions/BUILD.gn
Line 104, Patchset 51 (Latest): "api/enterprise_policy/enterprise_policy_api.cc",
Devlin Cronin . unresolved

as mentioned [here](https://crrev.com/c/7030621/39..51/chrome/browser/BUILD.gn#b7354), we should only put these in //c/b/extensions/BUILD.gn if they can't go in the separate BUILD.gn in the API dir. Does that not work for some reason?

Line 1726, Patchset 51 (Latest): "//services/network/public/cpp",
Devlin Cronin . unresolved

is this needed?

File chrome/browser/extensions/api/enterprise_policy/enterprise_policy_api_unittest.cc
Line 86, Patchset 39:TEST_F(EnterprisePolicyApiUnittest, UploadReport_Success) {
Devlin Cronin . unresolved

is there any way we can validate that it uploaded the report?

Patrick Kettner

I dont think so (at least as far as I can tell). I am reusing the existing `UploadFullReport`, and as far as I am able to reason it only takes a completion closure and doesn't pass back a status for the actual upload. It "succeeds" as long as it triggers the process. I assume that adding anything would require work on the server side?

Devlin Cronin

I'm not so much suggesting we test the full end-to-end flow with a "real" report upload, but rather that we check that we (at least attempted to) trigger the report upload. Right now, if we replaced the body of the function with just "RespondNow(NoArguments())", this test would still pass.

It looks like a few unit tests use the [last upload time](https://source.chromium.org/chromium/chromium/src/+/main:components/enterprise/browser/reporting/common_pref_names.cc;l=20;drc=5cfe525024bc42f5433fff03ee62998590268c2b) preference to check that a report was uploaded; perhaps that would work?

Patrick Kettner

I updated the test setup to init CloudProfileReportingService and flush it's tasks. WDYT?

Devlin Cronin

This looks better; thanks!

Line 146, Patchset 51 (Latest): enterprise_reporting::kLastUploadTimestamp) != base::Time();
Devlin Cronin . unresolved

we should verify that it *is* set to base::Time() before the call; otherwise, this would pass even if the function didn't do anything

Line 150, Patchset 51 (Latest):TEST_F(EnterprisePolicyApiUnittest, UploadReport_IncognitoProfile) {
Devlin Cronin . unresolved

what is the expected behavior here? Should it upload the report for the main profile, the incognito profile, something else? As this test is today, it's very difficult to tell what should happen

Line 164, Patchset 51 (Latest):TEST_F(EnterprisePolicyApiUnittest, Reload_Success) {
Devlin Cronin . unresolved

similar to the comment above, is there some way we can test that this function properly triggers a reload?

File chrome/common/extensions/api/enterprise_policy.webidl
Line 8, Patchset 51 (Latest):[permissions = "enterprisePolicy"]
Devlin Cronin . unresolved

this isn't an attribute we use -- did you usee this pattern used elsewhere?

Line 16, Patchset 51 (Latest): // |Returns| A promise that resolves when the report has successfully uploaded.
Devlin Cronin . unresolved

need a colon after |Returns|

`|Returns|: A promise...`

(for all of these)

Line 16, Patchset 51 (Latest): // |Returns| A promise that resolves when the report has successfully uploaded.
Devlin Cronin . unresolved

wrap at 80 char

Open in Gerrit

Related details

Attention is currently required from:
  • Patrick Kettner
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: I2e700af6203e366c70b303b8e28967c948e1b2f8
Gerrit-Change-Number: 7030621
Gerrit-PatchSet: 51
Gerrit-Owner: Patrick Kettner <patrick...@google.com>
Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-Reviewer: Kelvin Jiang <kelvi...@chromium.org>
Gerrit-Reviewer: Patrick Kettner <patrick...@google.com>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-CC: Jerome Jiang <ji...@chromium.org>
Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
Gerrit-Attention: Patrick Kettner <patrick...@google.com>
Gerrit-Comment-Date: Fri, 10 Apr 2026 10:02:29 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Devlin Cronin <rdevlin...@chromium.org>
Comment-In-Reply-To: Patrick Kettner <patrick...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Patrick Kettner (Gerrit)

unread,
May 17, 2026, 12:37:27 PM (4 days ago) May 17
to Kelvin Jiang, Mirko Bonadei, Jerome Jiang, android-bu...@system.gserviceaccount.com, Chromium Metrics Reviews, chromium...@chromium.org, Code Review Nudger, Devlin Cronin, Chromium LUCI CQ, ortuno...@chromium.org, net-r...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, browser-comp...@chromium.org, jshin...@chromium.org, mfoltz+wa...@chromium.org, oshima...@chromium.org, titoua...@chromium.org, chromotin...@chromium.org, fgal...@chromium.org, dewitt...@chromium.org, chrome-intell...@chromium.org, jz...@chromium.org, cblume...@chromium.org, grt+...@chromium.org, eme-r...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, feature-me...@chromium.org, asvitkine...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, ipc-securi...@chromium.org, srahim...@chromium.org
Attention needed from Devlin Cronin and Kelvin Jiang

Patrick Kettner added 13 comments

Patchset-level comments
File-level comment, Patchset 51:
Devlin Cronin . resolved

Thanks, Patrick!

For CLs, please also make sure you do a "self-review" when uploading a new patch set to make sure all comments are addressed and all changes are intentional and necessary -- that can help catch some of these cases of unintentional changes or bad merge resolutions.

Patrick Kettner

Acknowledged

File chrome/browser/BUILD.gn
Line 7304, Patchset 51: "guest_view/app_view/chrome_app_view_guest_delegate.cc",
Devlin Cronin . resolved

why these changes? They seem very unrelated to this work

Patrick Kettner

Unintentional formatting change leftover from a bad merge/rebase. Reverted

File chrome/browser/extensions/BUILD.gn
Line 104, Patchset 51: "api/enterprise_policy/enterprise_policy_api.cc",
Devlin Cronin . resolved

as mentioned [here](https://crrev.com/c/7030621/39..51/chrome/browser/BUILD.gn#b7354), we should only put these in //c/b/extensions/BUILD.gn if they can't go in the separate BUILD.gn in the API dir. Does that not work for some reason?

Patrick Kettner

Done. moved the over to a dedicated source_set in the specific BUILD.gn within the API dir

Line 1726, Patchset 51: "//services/network/public/cpp",
Devlin Cronin . resolved

is this needed?

Patrick Kettner

Nope, leftover from an earlier iteration. Removed

File chrome/browser/extensions/api/enterprise_policy/enterprise_policy_api_unittest.cc
Line 63, Patchset 51: // The dispatcher forwards calls to the an API function.
Kelvin Jiang . resolved

not sure what this sentence is supposed to say

Patrick Kettner

removed

Line 64, Patchset 51: dispatcher_ = std::make_unique<ExtensionFunctionDispatcher>(profile());
Kelvin Jiang . resolved

I don't see this being used in the test?

Patrick Kettner

The dispatcher was no longer needed since api_test_utils::RunFunction creates its own. Removed

Line 86, Patchset 39:TEST_F(EnterprisePolicyApiUnittest, UploadReport_Success) {
Devlin Cronin . resolved

is there any way we can validate that it uploaded the report?

Patrick Kettner

I dont think so (at least as far as I can tell). I am reusing the existing `UploadFullReport`, and as far as I am able to reason it only takes a completion closure and doesn't pass back a status for the actual upload. It "succeeds" as long as it triggers the process. I assume that adding anything would require work on the server side?

Devlin Cronin

I'm not so much suggesting we test the full end-to-end flow with a "real" report upload, but rather that we check that we (at least attempted to) trigger the report upload. Right now, if we replaced the body of the function with just "RespondNow(NoArguments())", this test would still pass.

It looks like a few unit tests use the [last upload time](https://source.chromium.org/chromium/chromium/src/+/main:components/enterprise/browser/reporting/common_pref_names.cc;l=20;drc=5cfe525024bc42f5433fff03ee62998590268c2b) preference to check that a report was uploaded; perhaps that would work?

Patrick Kettner

I updated the test setup to init CloudProfileReportingService and flush it's tasks. WDYT?

Devlin Cronin

This looks better; thanks!

Patrick Kettner

Done

Line 146, Patchset 51: enterprise_reporting::kLastUploadTimestamp) != base::Time();
Devlin Cronin . resolved

we should verify that it *is* set to base::Time() before the call; otherwise, this would pass even if the function didn't do anything

Patrick Kettner

Done

Line 150, Patchset 51:TEST_F(EnterprisePolicyApiUnittest, UploadReport_IncognitoProfile) {
Devlin Cronin . unresolved

what is the expected behavior here? Should it upload the report for the main profile, the incognito profile, something else? As this test is today, it's very difficult to tell what should happen

Patrick Kettner

I've updated the test to explicitly assert that CloudProfileReportingServiceFactory returns null ptr in incognito. This clarifies why the report scheduler path safely early-returns and is skipped for incognito. (fun fact - b/513868285)

Line 164, Patchset 51:TEST_F(EnterprisePolicyApiUnittest, Reload_Success) {
Devlin Cronin . resolved

similar to the comment above, is there some way we can test that this function properly triggers a reload?

Patrick Kettner

done. refactored the test to use a mocked PolicyService

File chrome/common/extensions/api/enterprise_policy.webidl
Line 8, Patchset 51:[permissions = "enterprisePolicy"]
Devlin Cronin . resolved

this isn't an attribute we use -- did you usee this pattern used elsewhere?

Patrick Kettner

Done

Line 16, Patchset 51: // |Returns| A promise that resolves when the report has successfully uploaded.
Devlin Cronin . resolved

need a colon after |Returns|

`|Returns|: A promise...`

(for all of these)

Patrick Kettner

Done

Line 16, Patchset 51: // |Returns| A promise that resolves when the report has successfully uploaded.
Devlin Cronin . resolved

wrap at 80 char

Patrick Kettner

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Devlin Cronin
  • Kelvin Jiang
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: I2e700af6203e366c70b303b8e28967c948e1b2f8
Gerrit-Change-Number: 7030621
Gerrit-PatchSet: 54
Gerrit-Owner: Patrick Kettner <patrick...@google.com>
Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-Reviewer: Kelvin Jiang <kelvi...@chromium.org>
Gerrit-Reviewer: Patrick Kettner <patrick...@google.com>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
Gerrit-CC: Jerome Jiang <ji...@chromium.org>
Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
Gerrit-Attention: Devlin Cronin <rdevlin...@chromium.org>
Gerrit-Attention: Kelvin Jiang <kelvi...@chromium.org>
Gerrit-Comment-Date: Sun, 17 May 2026 16:37:00 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Devlin Cronin <rdevlin...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Kelvin Jiang (Gerrit)

unread,
May 20, 2026, 6:28:39 AM (yesterday) May 20
to Patrick Kettner, Mirko Bonadei, Jerome Jiang, android-bu...@system.gserviceaccount.com, Chromium Metrics Reviews, chromium...@chromium.org, Code Review Nudger, Devlin Cronin, Chromium LUCI CQ, ortuno...@chromium.org, net-r...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, browser-comp...@chromium.org, jshin...@chromium.org, mfoltz+wa...@chromium.org, oshima...@chromium.org, titoua...@chromium.org, chromotin...@chromium.org, fgal...@chromium.org, dewitt...@chromium.org, chrome-intell...@chromium.org, jz...@chromium.org, cblume...@chromium.org, grt+...@chromium.org, eme-r...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, feature-me...@chromium.org, asvitkine...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, ipc-securi...@chromium.org, srahim...@chromium.org
Attention needed from Devlin Cronin and Patrick Kettner

Kelvin Jiang voted and added 1 comment

Votes added by Kelvin Jiang

Code-Review+1

1 comment

Patchset-level comments
File-level comment, Patchset 54 (Latest):
Kelvin Jiang . resolved

LGTM thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Devlin Cronin
  • Patrick Kettner
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement 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: I2e700af6203e366c70b303b8e28967c948e1b2f8
    Gerrit-Change-Number: 7030621
    Gerrit-PatchSet: 54
    Gerrit-Owner: Patrick Kettner <patrick...@google.com>
    Gerrit-Reviewer: Devlin Cronin <rdevlin...@chromium.org>
    Gerrit-Reviewer: Kelvin Jiang <kelvi...@chromium.org>
    Gerrit-Reviewer: Patrick Kettner <patrick...@google.com>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Code Review Nudger <android-build...@prod.google.com>
    Gerrit-CC: Jerome Jiang <ji...@chromium.org>
    Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
    Gerrit-Attention: Devlin Cronin <rdevlin...@chromium.org>
    Gerrit-Attention: Patrick Kettner <patrick...@google.com>
    Gerrit-Comment-Date: Wed, 20 May 2026 10:28:23 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Devlin Cronin (Gerrit)

    unread,
    May 20, 2026, 1:13:52 PM (yesterday) May 20
    to Patrick Kettner, Kelvin Jiang, Mirko Bonadei, Jerome Jiang, android-bu...@system.gserviceaccount.com, Chromium Metrics Reviews, chromium...@chromium.org, Code Review Nudger, Devlin Cronin, Chromium LUCI CQ, ortuno...@chromium.org, net-r...@chromium.org, chrome-intelligence-te...@google.com, devtools...@chromium.org, browser-comp...@chromium.org, jshin...@chromium.org, mfoltz+wa...@chromium.org, oshima...@chromium.org, titoua...@chromium.org, chromotin...@chromium.org, fgal...@chromium.org, dewitt...@chromium.org, chrome-intell...@chromium.org, jz...@chromium.org, cblume...@chromium.org, grt+...@chromium.org, eme-r...@chromium.org, mar...@chromium.org, penghuan...@chromium.org, feature-me...@chromium.org, asvitkine...@chromium.org, chromium-a...@chromium.org, extension...@chromium.org, ipc-securi...@chromium.org, srahim...@chromium.org
    Attention needed from Patrick Kettner

    Devlin Cronin added 13 comments

    Patchset-level comments
    Devlin Cronin . resolved

    Thanks, Patrick!

    File .gitmodules
    Line 379, Patchset 54 (Latest):[submodule "third_party/libphonenumber/src"]
    Devlin Cronin . unresolved

    gitmodules should not be changed in this CL, most likely

    File chrome/browser/extensions/api/enterprise_policy/BUILD.gn
    Line 16, Patchset 54 (Latest): ":enterprise_policy",
    Devlin Cronin . unresolved

    nit: put local references above // references

    Line 30, Patchset 54 (Latest):
    Devlin Cronin . unresolved

    nit: extra newline

    Line 34, Patchset 54 (Latest): "//chrome/browser/policy:policy",
    Devlin Cronin . unresolved

    nit: foo:foo is the same as foo; prefer just //chrome/browser/policy

    Line 40, Patchset 54 (Latest): "//extensions/browser",
    Devlin Cronin . unresolved

    nit: sort

    File chrome/browser/extensions/api/enterprise_policy/enterprise_policy_api.cc
    Line 60, Patchset 54 (Latest): return RespondNow(NoArguments());
    Devlin Cronin . unresolved

    optional: should this be an error, since no report is actually submitted? (Up to you on what you think the behavior should be)

    File chrome/browser/extensions/api/enterprise_policy/enterprise_policy_api_unittest.cc
    Line 45, Patchset 54 (Latest): FakeReportUploader() : ReportUploader(nullptr, 0) {}
    Devlin Cronin . unresolved

    nit: please document anonymous parameters:

    ```
    (/*client=*/nullptr, /*maximum_number_of_retries=*/0)
    ```

    Line 51, Patchset 54 (Latest): ::enterprise_reporting::ReportUploader::ReportCallback callback)
    Devlin Cronin . unresolved

    nit: you probably don't need this prefix, since its inherited from the super class. Ditto for line 53

    Line 90, Patchset 54 (Latest):#else // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS)
    Devlin Cronin . unresolved

    Only uploadReport() is unsupported, right? Can we have the tests for GetPolicies() and Reload() across all platforms?

    Line 136, Patchset 54 (Latest): // Verify the timestamp is unset before the call.
    ASSERT_EQ(base::Time(), profile()->GetPrefs()->GetTime(
    enterprise_reporting::kLastUploadTimestamp));
    Devlin Cronin . unresolved

    nit: indentation off

    Line 147, Patchset 54 (Latest): EXPECT_TRUE(base::test::RunUntil([&]() {
    Devlin Cronin . unresolved

    is this RunUntil needed? The function should only finish once the report is uploaded, and RunFunction() will wait for that to happen.

    Line 150, Patchset 51:TEST_F(EnterprisePolicyApiUnittest, UploadReport_IncognitoProfile) {
    Devlin Cronin . unresolved

    what is the expected behavior here? Should it upload the report for the main profile, the incognito profile, something else? As this test is today, it's very difficult to tell what should happen

    Patrick Kettner

    I've updated the test to explicitly assert that CloudProfileReportingServiceFactory returns null ptr in incognito. This clarifies why the report scheduler path safely early-returns and is skipped for incognito. (fun fact - b/513868285)

    Devlin Cronin

    Ack; thanks, Patrick!

    Two questions:
    1) Are we sure we don't want an error here? It seems odd to indicate to the extension that the upload succeeded when no upload took place.
    2) Can we verify a report _wasn't_ uploaded by checking kLastUploadTimestamp is base::Time()?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Patrick Kettner
    Gerrit-Attention: Patrick Kettner <patrick...@google.com>
    Gerrit-Comment-Date: Wed, 20 May 2026 17:13:39 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Devlin Cronin <rdevlin...@chromium.org>
    Comment-In-Reply-To: Patrick Kettner <patrick...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy
    Reply all
    Reply to author
    Forward
    0 new messages