Update Page Info Chip for Suspicious Sites on Android [chromium/src : main]

0 views
Skip to first unread message

Richard Chen (Gerrit)

unread,
Jul 23, 2026, 4:04:10 PM (3 days ago) Jul 23
to Jerome Jiang, Mirko Bonadei, Awad Osman, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, Chromium Metrics Reviews, chromium...@chromium.org, droger+w...@chromium.org, fgal...@chromium.org, oshima...@chromium.org, cblume...@chromium.org, penghuan...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org, mar...@chromium.org, devtools...@chromium.org, jz...@chromium.org, browser-comp...@chromium.org, orinj...@chromium.org, christia...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, permissio...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org, ios-r...@chromium.org, nwoked...@chromium.org, vakh+safe_br...@chromium.org, xinghui...@chromium.org, zackha...@chromium.org
Attention needed from Awad Osman

Richard Chen added 4 comments

Commit Message
Line 24, Patchset 24:
Awad Osman . resolved

nit: include screenshot of UI changes

Richard Chen

Done

File components/page_info/android/java/res/layout/page_info.xml
Line 48, Patchset 24:
Awad Osman . resolved

Please fix this WARNING reported by Trailing Whitespace: Please remove the trailing whitespace.

Richard Chen

Done

Line 65, Patchset 24:
Awad Osman . resolved

Please fix this WARNING reported by Trailing Whitespace: Please remove the trailing whitespace.

Richard Chen

Done

File components/page_info/android/java/src/org/chromium/components/page_info/PageInfoConnectionController.java
Line 139, Patchset 24: if (details.contains("<link>")) {
Awad Osman . resolved

nit: does this make the link clickable. Do we need a `ClickableSpan` here?

Richard Chen

Done. When details contains `<link>`, `SpanApplier.applySpans` wraps the link text in a `ChromeClickableSpan` (which extends `ClickableSpan`) and attaches the `openSuspiciousSiteHelpCenter()` click listener:

Open in Gerrit

Related details

Attention is currently required from:
  • Awad Osman
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: I04b5b5c85af6328c0b8f120b549b1f42793b16d1
Gerrit-Change-Number: 8091775
Gerrit-PatchSet: 78
Gerrit-Owner: Richard Chen <ric...@google.com>
Gerrit-Reviewer: Awad Osman <aw...@google.com>
Gerrit-Reviewer: Richard Chen <ric...@google.com>
Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
Gerrit-CC: Jerome Jiang <ji...@chromium.org>
Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
Gerrit-Attention: Awad Osman <aw...@google.com>
Gerrit-Comment-Date: Thu, 23 Jul 2026 20:03:58 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Awad Osman <aw...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Awad Osman (Gerrit)

unread,
Jul 23, 2026, 4:12:22 PM (3 days ago) Jul 23
to Richard Chen, Jerome Jiang, Mirko Bonadei, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, Chromium Metrics Reviews, chromium...@chromium.org, droger+w...@chromium.org, fgal...@chromium.org, oshima...@chromium.org, cblume...@chromium.org, penghuan...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org, mar...@chromium.org, devtools...@chromium.org, jz...@chromium.org, browser-comp...@chromium.org, orinj...@chromium.org, christia...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, permissio...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org, ios-r...@chromium.org, nwoked...@chromium.org, vakh+safe_br...@chromium.org, xinghui...@chromium.org, zackha...@chromium.org
Attention needed from Richard Chen

Awad Osman voted Code-Review+1

Code-Review+1
Open in Gerrit

Related details

Attention is currently required from:
  • Richard Chen
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • 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: I04b5b5c85af6328c0b8f120b549b1f42793b16d1
    Gerrit-Change-Number: 8091775
    Gerrit-PatchSet: 78
    Gerrit-Owner: Richard Chen <ric...@google.com>
    Gerrit-Reviewer: Awad Osman <aw...@google.com>
    Gerrit-Reviewer: Richard Chen <ric...@google.com>
    Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
    Gerrit-CC: Jerome Jiang <ji...@chromium.org>
    Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
    Gerrit-Attention: Richard Chen <ric...@google.com>
    Gerrit-Comment-Date: Thu, 23 Jul 2026 20:12:14 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Sinan Sahin (Gerrit)

    unread,
    Jul 23, 2026, 5:00:39 PM (3 days ago) Jul 23
    to Richard Chen, Emily Stark, Awad Osman, Jerome Jiang, Mirko Bonadei, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, Chromium Metrics Reviews, chromium...@chromium.org, droger+w...@chromium.org, fgal...@chromium.org, oshima...@chromium.org, cblume...@chromium.org, penghuan...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org, mar...@chromium.org, devtools...@chromium.org, jz...@chromium.org, browser-comp...@chromium.org, orinj...@chromium.org, christia...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, permissio...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org, ios-r...@chromium.org, nwoked...@chromium.org, vakh+safe_br...@chromium.org, xinghui...@chromium.org, zackha...@chromium.org
    Attention needed from Awad Osman, Emily Stark and Richard Chen

    Sinan Sahin added 1 comment

    File components/browser_ui/styles/android/java/res/drawable/ic_globe_off_24dp.xml
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Awad Osman
    • Emily Stark
    • Richard Chen
    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: I04b5b5c85af6328c0b8f120b549b1f42793b16d1
      Gerrit-Change-Number: 8091775
      Gerrit-PatchSet: 79
      Gerrit-Owner: Richard Chen <ric...@google.com>
      Gerrit-Reviewer: Awad Osman <aw...@google.com>
      Gerrit-Reviewer: Emily Stark <est...@chromium.org>
      Gerrit-Reviewer: Richard Chen <ric...@google.com>
      Gerrit-Reviewer: Sinan Sahin <sinan...@google.com>
      Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
      Gerrit-CC: Jerome Jiang <ji...@chromium.org>
      Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
      Gerrit-Attention: Richard Chen <ric...@google.com>
      Gerrit-Attention: Emily Stark <est...@chromium.org>
      Gerrit-Attention: Awad Osman <aw...@google.com>
      Gerrit-Comment-Date: Thu, 23 Jul 2026 21:00:27 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Richard Chen (Gerrit)

      unread,
      Jul 24, 2026, 1:45:00 PM (2 days ago) Jul 24
      to Emily Stark, Sinan Sahin, Awad Osman, Jerome Jiang, Mirko Bonadei, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, Chromium Metrics Reviews, chromium...@chromium.org, droger+w...@chromium.org, fgal...@chromium.org, oshima...@chromium.org, cblume...@chromium.org, penghuan...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org, mar...@chromium.org, devtools...@chromium.org, jz...@chromium.org, browser-comp...@chromium.org, orinj...@chromium.org, christia...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, permissio...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org, ios-r...@chromium.org, nwoked...@chromium.org, vakh+safe_br...@chromium.org, xinghui...@chromium.org, zackha...@chromium.org
      Attention needed from Emily Stark and Sinan Sahin

      Richard Chen added 1 comment

      File components/browser_ui/styles/android/java/res/drawable/ic_globe_off_24dp.xml
      File-level comment, Patchset 79:
      Sinan Sahin . resolved
      Richard Chen

      Thanks for providing that! Switched to that one instead.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Emily Stark
      • Sinan Sahin
      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: I04b5b5c85af6328c0b8f120b549b1f42793b16d1
        Gerrit-Change-Number: 8091775
        Gerrit-PatchSet: 85
        Gerrit-Owner: Richard Chen <ric...@google.com>
        Gerrit-Reviewer: Awad Osman <aw...@google.com>
        Gerrit-Reviewer: Emily Stark <est...@chromium.org>
        Gerrit-Reviewer: Richard Chen <ric...@google.com>
        Gerrit-Reviewer: Sinan Sahin <sinan...@google.com>
        Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
        Gerrit-CC: Jerome Jiang <ji...@chromium.org>
        Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
        Gerrit-Attention: Sinan Sahin <sinan...@google.com>
        Gerrit-Attention: Emily Stark <est...@chromium.org>
        Gerrit-Comment-Date: Fri, 24 Jul 2026 17:44:54 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Sinan Sahin <sinan...@google.com>
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Emily Stark (Gerrit)

        unread,
        Jul 24, 2026, 7:18:32 PM (2 days ago) Jul 24
        to Richard Chen, Sinan Sahin, Awad Osman, Jerome Jiang, Mirko Bonadei, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, Chromium Metrics Reviews, chromium...@chromium.org, droger+w...@chromium.org, fgal...@chromium.org, oshima...@chromium.org, cblume...@chromium.org, penghuan...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org, mar...@chromium.org, devtools...@chromium.org, jz...@chromium.org, browser-comp...@chromium.org, orinj...@chromium.org, christia...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, permissio...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org, ios-r...@chromium.org, nwoked...@chromium.org, vakh+safe_br...@chromium.org, xinghui...@chromium.org, zackha...@chromium.org
        Attention needed from Richard Chen and Sinan Sahin

        Emily Stark added 8 comments

        Commit Message
        Line 19, Patchset 85 (Latest):* Adds corresponding unit tests in `page_info_unittest.cc`.
        Emily Stark . unresolved

        This file isn't touched in the CL; is this perhaps a typo for page_info_ui_unittest.cc, or did you forget to add unit tests in page_info_unittest.cc?

        File components/page_info/android/java/src/org/chromium/components/page_info/PageInfoConnectionController.java
        Line 140, Patchset 85 (Latest): if (details.contains("<link>")) {
        messageBuilder.append(
        SpanApplier.applySpans(
        details,
        new SpanInfo(
        "<link>",
        "</link>",
        new ChromeClickableSpan(
        mRowView.getContext(),
        (view) ->
        mMainController
        .openSafeBrowsingHelpCenter()))));
        } else {
        messageBuilder.append(details);
        }
        Emily Stark . unresolved

        This seems a bit brittle in that it's assuming any <link> in `details` should go to the Safe Browsing help center. Would it be possible to provide a link destination as a function argument or otherwise make sure that we're replacing <link>s with the correct destination?

        File components/page_info/android/java/src/org/chromium/components/page_info/PageInfoController.java
        Line 131, Patchset 85 (Latest): private boolean mIsSuspiciousSite;
        Emily Stark . unresolved

        Please add a comment explaining what this field is. Also might be helpful to explain why PageInfoController needs to know about this state specifically (i.e. why do we need `mIsSuspiciousSite` but not `mIsPhishingSite` or `mIsDangerousSite` etc.).

        ...

        after reading further, maybe it would make more sense to save this as something about the favicon (`mUseSiteFavicon`) or something since it's specific to that use case?

        Line 260, Patchset 85 (Latest): if (mDialog == null || mIsSuspiciousSite) return;
        Emily Stark . unresolved

        It'd be good to have a test for this favicon overriding behavior -- but I imagine it might be tricky to test if you need to control when the callback fires in the test. It might be okay to not have test coverage for this if it's really tricky, but maybe you could look into whether it's possible or not?

        Line 409, Patchset 85 (Latest): public void setSecurityDescription(String summary, String details, boolean isSuspiciousSite) {
        Emily Stark . unresolved

        optional: I find it a bit weird that this method sets opaque strings and then also does this very suspicious-site-specific stuff. Maybe the suspicious site UI should be configured by a separate method that gets called separately? Ok to do in a follow-up CL though.

        File components/page_info/android/java/src/org/chromium/components/page_info/PageInfoView.java
        Line 106, Patchset 85 (Latest): View wrapper = findViewById(R.id.page_info_connection_wrapper);
        Emily Stark . unresolved

        nit: This is amplifying a pre-existing problem that the "connection" wrapper is not just used for connection information, but for Safe Browsing status as well. Would you mind filing a bug to clean this up?

        File components/page_info/android/page_info_controller_android.cc
        Line 161, Patchset 85 (Latest):
        Emily Stark . unresolved

        Can you add tests to verify that clicking on the buttons and link work as expected?

        It could be good to also test that the UMA metrics are recorded as expected though it'd be okay to do that in a follow-up CL IMO.

        Line 169, Patchset 85 (Latest): if (web_contents_->GetController().CanGoBack()) {
        web_contents_->GetController().GoBack();
        Emily Stark . unresolved

        What will happen if the user visits multiple pages on the same suspicious site? (For example, if a user visits https://suspicious[.]com and then clicks a link to another website on the same domain.) Will they see the warning on each page load? Will they see this UI in Page Info on the second page load and if so will "Back to Safety" take them back to suspicious[.]com?

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Richard Chen
        • Sinan Sahin
        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: I04b5b5c85af6328c0b8f120b549b1f42793b16d1
          Gerrit-Change-Number: 8091775
          Gerrit-PatchSet: 85
          Gerrit-Owner: Richard Chen <ric...@google.com>
          Gerrit-Reviewer: Awad Osman <aw...@google.com>
          Gerrit-Reviewer: Emily Stark <est...@chromium.org>
          Gerrit-Reviewer: Richard Chen <ric...@google.com>
          Gerrit-Reviewer: Sinan Sahin <sinan...@google.com>
          Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
          Gerrit-CC: Jerome Jiang <ji...@chromium.org>
          Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
          Gerrit-Attention: Sinan Sahin <sinan...@google.com>
          Gerrit-Attention: Richard Chen <ric...@google.com>
          Gerrit-Comment-Date: Fri, 24 Jul 2026 23:18:23 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Sinan Sahin (Gerrit)

          unread,
          Jul 24, 2026, 7:29:53 PM (2 days ago) Jul 24
          to Richard Chen, Emily Stark, Awad Osman, Jerome Jiang, Mirko Bonadei, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, Chromium Metrics Reviews, chromium...@chromium.org, droger+w...@chromium.org, fgal...@chromium.org, oshima...@chromium.org, cblume...@chromium.org, penghuan...@chromium.org, chrome-intelligence-te...@google.com, chrome-intell...@chromium.org, mar...@chromium.org, devtools...@chromium.org, jz...@chromium.org, browser-comp...@chromium.org, orinj...@chromium.org, christia...@chromium.org, jdonnel...@chromium.org, omnibox-...@chromium.org, permissio...@chromium.org, android-web...@chromium.org, asvitkine...@chromium.org, ios-r...@chromium.org, nwoked...@chromium.org, vakh+safe_br...@chromium.org, xinghui...@chromium.org, zackha...@chromium.org
          Attention needed from Richard Chen

          Sinan Sahin voted and added 1 comment

          Votes added by Sinan Sahin

          Code-Review+1

          1 comment

          Patchset-level comments
          File-level comment, Patchset 85 (Latest):
          Sinan Sahin . resolved

          components/browser_ui LGTM

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Richard Chen
          Submit Requirements:
            • requirement satisfiedCode-Coverage
            • requirement is not satisfiedCode-Owners
            • requirement 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: I04b5b5c85af6328c0b8f120b549b1f42793b16d1
            Gerrit-Change-Number: 8091775
            Gerrit-PatchSet: 85
            Gerrit-Owner: Richard Chen <ric...@google.com>
            Gerrit-Reviewer: Awad Osman <aw...@google.com>
            Gerrit-Reviewer: Emily Stark <est...@chromium.org>
            Gerrit-Reviewer: Richard Chen <ric...@google.com>
            Gerrit-Reviewer: Sinan Sahin <sinan...@google.com>
            Gerrit-CC: Chromium Metrics Reviews <chromium-met...@google.com>
            Gerrit-CC: Jerome Jiang <ji...@chromium.org>
            Gerrit-CC: Mirko Bonadei <mbon...@chromium.org>
            Gerrit-Attention: Richard Chen <ric...@google.com>
            Gerrit-Comment-Date: Fri, 24 Jul 2026 23:29:45 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: Yes
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy
            Reply all
            Reply to author
            Forward
            0 new messages