Disable history sync buttons after click and close dialog optionally [chromium/src : main]

0 views
Skip to first unread message

Ryan Sultanem (Gerrit)

unread,
Nov 3, 2025, 11:55:39 AM (4 days ago) Nov 3
to Anthi Orfanou, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Anthi Orfanou

Ryan Sultanem added 5 comments

Patchset-level comments
File-level comment, Patchset 10:
Ryan Sultanem . resolved

Thanks Anthi!

LGTM % comments/nits

File chrome/browser/ui/signin/signin_view_controller_interactive_uitest.cc
Line 307, Patchset 10: state == DialogButtonEnableState::kDisabled ? true : false;
Ryan Sultanem . unresolved

nit: this can be removed.

Line 315, Patchset 10: return GetParam() == ButtonToClick::kAcceptButton
Ryan Sultanem . unresolved

nit: exhaustive switch statement is clearer here in my opinion.

Line 356, Patchset 10: DialogButtonEnableState::kDisabled));
Ryan Sultanem . unresolved

Do you think it is worth attempting to `ClickButton()` again, and expecting nothing. Maybe we could also link the original bug that we had.

File chrome/browser/ui/views/profiles/history_sync_optin_ui_browsertest.cc
Line 160, Patchset 5: {{.test_suffix = "RegularPostClick"}, /*.after_button_click=*/true},
Ryan Sultanem . unresolved

I would not have expected a pixel test for that.

Would adding a typscript test be better?

Anthi Orfanou

Right now we don't have any such tests, I will try to produce one.

Anthi Orfanou

I have added a new ui test after making the closing of the dialog optional. I've filed another bug (457370781) for js tests, but so far I fail to instantiate correctly the page under test.

Should I remove the pixel test case?

Ryan Sultanem

Thank you for tackling this!

Yes I would say removing the pixel tests is better, as it is not really a "screenshot" like test, and the interactive ui test that you added cover it well enough!

Open in Gerrit

Related details

Attention is currently required from:
  • Anthi Orfanou
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: I78dcc7539b996b7d11c32293115acb8d8deec4b9
Gerrit-Change-Number: 7105822
Gerrit-PatchSet: 10
Gerrit-Owner: Anthi Orfanou <ant...@google.com>
Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
Gerrit-Reviewer: Ryan Sultanem <rs...@google.com>
Gerrit-Attention: Anthi Orfanou <ant...@google.com>
Gerrit-Comment-Date: Mon, 03 Nov 2025 16:55:26 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Ryan Sultanem <rs...@google.com>
Comment-In-Reply-To: Anthi Orfanou <ant...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Anthi Orfanou (Gerrit)

unread,
Nov 3, 2025, 11:56:23 AM (4 days ago) Nov 3
to Ryan Sultanem, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Anthi Orfanou

Anthi Orfanou voted and added 1 comment

Votes added by Anthi Orfanou

Commit-Queue+1

1 comment

File chrome/browser/ui/views/profiles/history_sync_optin_ui_browsertest.cc
Line 160, Patchset 5: {{.test_suffix = "RegularPostClick"}, /*.after_button_click=*/true},
Ryan Sultanem . unresolved

I would not have expected a pixel test for that.

Would adding a typscript test be better?

Anthi Orfanou

Right now we don't have any such tests, I will try to produce one.

Anthi Orfanou

I have added a new ui test after making the closing of the dialog optional. I've filed another bug (457370781) for js tests, but so far I fail to instantiate correctly the page under test.

Should I remove the pixel test case?

Anthi Orfanou

test is added in chrome/browser/ui/signin/signin_view_controller_interactive_uitest.cc

Open in Gerrit

Related details

Attention is currently required from:
  • Anthi Orfanou
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: I78dcc7539b996b7d11c32293115acb8d8deec4b9
Gerrit-Change-Number: 7105822
Gerrit-PatchSet: 11
Gerrit-Owner: Anthi Orfanou <ant...@google.com>
Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
Gerrit-Reviewer: Ryan Sultanem <rs...@google.com>
Gerrit-Attention: Anthi Orfanou <ant...@google.com>
Gerrit-Comment-Date: Mon, 03 Nov 2025 16:56:06 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Anthi Orfanou (Gerrit)

unread,
Nov 3, 2025, 12:08:01 PM (4 days ago) Nov 3
to Ryan Sultanem, Chromium LUCI CQ, chromium...@chromium.org
Attention needed from Ryan Sultanem

Anthi Orfanou added 4 comments

File chrome/browser/ui/signin/signin_view_controller_interactive_uitest.cc
Line 307, Patchset 10: state == DialogButtonEnableState::kDisabled ? true : false;
Ryan Sultanem . resolved

nit: this can be removed.

Anthi Orfanou

Done

Line 315, Patchset 10: return GetParam() == ButtonToClick::kAcceptButton
Ryan Sultanem . resolved

nit: exhaustive switch statement is clearer here in my opinion.

Anthi Orfanou

Done

Line 356, Patchset 10: DialogButtonEnableState::kDisabled));
Ryan Sultanem . resolved

Do you think it is worth attempting to `ClickButton()` again, and expecting nothing. Maybe we could also link the original bug that we had.

Anthi Orfanou

Done

File chrome/browser/ui/views/profiles/history_sync_optin_ui_browsertest.cc
Line 160, Patchset 5: {{.test_suffix = "RegularPostClick"}, /*.after_button_click=*/true},
Ryan Sultanem . resolved

I would not have expected a pixel test for that.

Would adding a typscript test be better?

Anthi Orfanou

Right now we don't have any such tests, I will try to produce one.

Anthi Orfanou

I have added a new ui test after making the closing of the dialog optional. I've filed another bug (457370781) for js tests, but so far I fail to instantiate correctly the page under test.

Should I remove the pixel test case?

Anthi Orfanou

test is added in chrome/browser/ui/signin/signin_view_controller_interactive_uitest.cc

Anthi Orfanou

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Ryan Sultanem
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: I78dcc7539b996b7d11c32293115acb8d8deec4b9
    Gerrit-Change-Number: 7105822
    Gerrit-PatchSet: 12
    Gerrit-Owner: Anthi Orfanou <ant...@google.com>
    Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
    Gerrit-Reviewer: Ryan Sultanem <rs...@google.com>
    Gerrit-Attention: Ryan Sultanem <rs...@google.com>
    Gerrit-Comment-Date: Mon, 03 Nov 2025 17:07:47 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Anthi Orfanou (Gerrit)

    unread,
    Nov 3, 2025, 12:36:40 PM (4 days ago) Nov 3
    to Ryan Sultanem, Chromium LUCI CQ, chromium...@chromium.org
    Attention needed from Ryan Sultanem

    Anthi Orfanou voted Auto-Submit+1

    Auto-Submit+1
    Open in Gerrit

    Related details

    Attention is currently required from:
    • Ryan Sultanem
    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: I78dcc7539b996b7d11c32293115acb8d8deec4b9
    Gerrit-Change-Number: 7105822
    Gerrit-PatchSet: 14
    Gerrit-Owner: Anthi Orfanou <ant...@google.com>
    Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
    Gerrit-Reviewer: Ryan Sultanem <rs...@google.com>
    Gerrit-Attention: Ryan Sultanem <rs...@google.com>
    Gerrit-Comment-Date: Mon, 03 Nov 2025 17:36:23 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Ryan Sultanem (Gerrit)

    unread,
    Nov 4, 2025, 9:36:25 AM (3 days ago) Nov 4
    to Anthi Orfanou, Chromium LUCI CQ, chromium...@chromium.org
    Attention needed from Anthi Orfanou

    Ryan Sultanem voted and added 5 comments

    Votes added by Ryan Sultanem

    Code-Review+1

    5 comments

    Patchset-level comments
    File-level comment, Patchset 14 (Latest):
    Ryan Sultanem . resolved

    LGTM % question/confirmation.

    Thanks!

    Commit Message
    Line 10, Patchset 14 (Latest):history sync optin screen, conditional (thought a dedicated
    Ryan Sultanem . unresolved

    nit: `through`

    File chrome/browser/ui/signin/signin_view_controller.h
    Line 234, Patchset 14 (Latest): FRIEND_TEST_ALL_PREFIXES(HistorySyncOptinUIWindowPixelTest, InvokeUi_default);
    Ryan Sultanem . unresolved

    nit: this can be removed, right?

    File chrome/browser/ui/views/profiles/profile_picker_post_sign_in_adapter.cc
    Line 329, Patchset 14 (Latest): /*browser=*/nullptr, /*should_close_modal_dialog=*/false,
    Ryan Sultanem . unresolved

    Just confirming: Is this expected?

    My understanding from the commit message is that this param should be used only for testing for now, but in a later change it will actually be used in production.

    2 points:

    • If it will not be used in production, maybe we can think of a cleaner solution? Please ignore if it is actually needed.
    • Is this changing the behavior for the Profile Picker flow? Or is it ignored for this flow as there are no browsers?

    Maybe an idea could be to reuse `HistorySyncOptinLaunchContext` somehow? E.g. for test add a new value maybe? This could be more explicit. Just an idea, I am not fully aware on how this could be used later on.

    Assume this as a question/non blocking comment - just sharing ideas.

    File chrome/browser/ui/webui/signin/history_sync_optin/history_sync_optin_handler.cc
    Line 172, Patchset 14 (Latest): // possible. Covert back to a check after we verify we no longer hit this.
    Ryan Sultanem . unresolved

    nit: `Convert` :)

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Anthi Orfanou
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement 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: I78dcc7539b996b7d11c32293115acb8d8deec4b9
    Gerrit-Change-Number: 7105822
    Gerrit-PatchSet: 14
    Gerrit-Owner: Anthi Orfanou <ant...@google.com>
    Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
    Gerrit-Reviewer: Ryan Sultanem <rs...@google.com>
    Gerrit-Attention: Anthi Orfanou <ant...@google.com>
    Gerrit-Comment-Date: Tue, 04 Nov 2025 14:36:06 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Anthi Orfanou (Gerrit)

    unread,
    Nov 4, 2025, 11:55:14 AM (3 days ago) Nov 4
    to Ryan Sultanem, Chromium LUCI CQ, chromium...@chromium.org
    Attention needed from Ryan Sultanem

    Anthi Orfanou voted and added 4 comments

    Votes added by Anthi Orfanou

    Auto-Submit+1

    4 comments

    Commit Message
    Line 10, Patchset 14:history sync optin screen, conditional (thought a dedicated
    Ryan Sultanem . resolved

    nit: `through`

    Anthi Orfanou

    Done

    File chrome/browser/ui/signin/signin_view_controller.h
    Line 234, Patchset 14: FRIEND_TEST_ALL_PREFIXES(HistorySyncOptinUIWindowPixelTest, InvokeUi_default);
    Ryan Sultanem . resolved

    nit: this can be removed, right?

    Anthi Orfanou

    Done

    File chrome/browser/ui/views/profiles/profile_picker_post_sign_in_adapter.cc
    Line 329, Patchset 14: /*browser=*/nullptr, /*should_close_modal_dialog=*/false,
    Ryan Sultanem . unresolved

    Just confirming: Is this expected?

    My understanding from the commit message is that this param should be used only for testing for now, but in a later change it will actually be used in production.

    2 points:

    • If it will not be used in production, maybe we can think of a cleaner solution? Please ignore if it is actually needed.
    • Is this changing the behavior for the Profile Picker flow? Or is it ignored for this flow as there are no browsers?

    Maybe an idea could be to reuse `HistorySyncOptinLaunchContext` somehow? E.g. for test add a new value maybe? This could be more explicit. Just an idea, I am not fully aware on how this could be used later on.

    Assume this as a question/non blocking comment - just sharing ideas.

    Anthi Orfanou

    Yes, the value will be used in production for the case of the signin interception which should not close the dialog.

    In the profile picker the value does not matter at all:
    If there is a null browser there is no modal dialog attached to the browser to close.

    For consistency I can change this to true (previous behaviour) and add a comment that the value is ignored if browser is null. My suggestion would be to turn this to an optional:

    • the picker flows would use an nullopt
    • the browser flows would have to set it to true, except for the upcoming signin in interception. We can even CHECK in the browser that if the browser is set then the optional must have a value.

    What do you think? Maybe I can re-work this with the interception bubble CL?

    File chrome/browser/ui/webui/signin/history_sync_optin/history_sync_optin_handler.cc
    Line 172, Patchset 14: // possible. Covert back to a check after we verify we no longer hit this.
    Ryan Sultanem . resolved

    nit: `Convert` :)

    Anthi Orfanou

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Ryan Sultanem
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement 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: I78dcc7539b996b7d11c32293115acb8d8deec4b9
    Gerrit-Change-Number: 7105822
    Gerrit-PatchSet: 16
    Gerrit-Owner: Anthi Orfanou <ant...@google.com>
    Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
    Gerrit-Reviewer: Ryan Sultanem <rs...@google.com>
    Gerrit-Attention: Ryan Sultanem <rs...@google.com>
    Gerrit-Comment-Date: Tue, 04 Nov 2025 16:54:58 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Ryan Sultanem <rs...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Anthi Orfanou (Gerrit)

    unread,
    Nov 5, 2025, 9:03:48 AM (2 days ago) Nov 5
    to Ryan Sultanem, Chromium LUCI CQ, chromium...@chromium.org
    Attention needed from Ryan Sultanem

    Anthi Orfanou voted and added 1 comment

    Votes added by Anthi Orfanou

    Auto-Submit+1

    1 comment

    File chrome/browser/ui/views/profiles/profile_picker_post_sign_in_adapter.cc
    Line 329, Patchset 14: /*browser=*/nullptr, /*should_close_modal_dialog=*/false,
    Ryan Sultanem . unresolved

    Just confirming: Is this expected?

    My understanding from the commit message is that this param should be used only for testing for now, but in a later change it will actually be used in production.

    2 points:

    • If it will not be used in production, maybe we can think of a cleaner solution? Please ignore if it is actually needed.
    • Is this changing the behavior for the Profile Picker flow? Or is it ignored for this flow as there are no browsers?

    Maybe an idea could be to reuse `HistorySyncOptinLaunchContext` somehow? E.g. for test add a new value maybe? This could be more explicit. Just an idea, I am not fully aware on how this could be used later on.

    Assume this as a question/non blocking comment - just sharing ideas.

    Anthi Orfanou

    Yes, the value will be used in production for the case of the signin interception which should not close the dialog.

    In the profile picker the value does not matter at all:
    If there is a null browser there is no modal dialog attached to the browser to close.

    For consistency I can change this to true (previous behaviour) and add a comment that the value is ignored if browser is null. My suggestion would be to turn this to an optional:

    • the picker flows would use an nullopt
    • the browser flows would have to set it to true, except for the upcoming signin in interception. We can even CHECK in the browser that if the browser is set then the optional must have a value.

    What do you think? Maybe I can re-work this with the interception bubble CL?

    Anthi Orfanou

    Converted to an optional, let's revisit when we consume this for a valid use case where we want to skip.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Ryan Sultanem
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement 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: I78dcc7539b996b7d11c32293115acb8d8deec4b9
    Gerrit-Change-Number: 7105822
    Gerrit-PatchSet: 17
    Gerrit-Owner: Anthi Orfanou <ant...@google.com>
    Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
    Gerrit-Reviewer: Ryan Sultanem <rs...@google.com>
    Gerrit-Attention: Ryan Sultanem <rs...@google.com>
    Gerrit-Comment-Date: Wed, 05 Nov 2025 14:03:30 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Ryan Sultanem <rs...@google.com>
    Comment-In-Reply-To: Anthi Orfanou <ant...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Anthi Orfanou (Gerrit)

    unread,
    Nov 5, 2025, 9:04:06 AM (2 days ago) Nov 5
    to Ryan Sultanem, Chromium LUCI CQ, chromium...@chromium.org
    Attention needed from Ryan Sultanem

    Anthi Orfanou added 1 comment

    File chrome/browser/ui/views/profiles/profile_picker_post_sign_in_adapter.cc
    Line 329, Patchset 14: /*browser=*/nullptr, /*should_close_modal_dialog=*/false,
    Ryan Sultanem . resolved

    Just confirming: Is this expected?

    My understanding from the commit message is that this param should be used only for testing for now, but in a later change it will actually be used in production.

    2 points:

    • If it will not be used in production, maybe we can think of a cleaner solution? Please ignore if it is actually needed.
    • Is this changing the behavior for the Profile Picker flow? Or is it ignored for this flow as there are no browsers?

    Maybe an idea could be to reuse `HistorySyncOptinLaunchContext` somehow? E.g. for test add a new value maybe? This could be more explicit. Just an idea, I am not fully aware on how this could be used later on.

    Assume this as a question/non blocking comment - just sharing ideas.

    Anthi Orfanou

    Yes, the value will be used in production for the case of the signin interception which should not close the dialog.

    In the profile picker the value does not matter at all:
    If there is a null browser there is no modal dialog attached to the browser to close.

    For consistency I can change this to true (previous behaviour) and add a comment that the value is ignored if browser is null. My suggestion would be to turn this to an optional:

    • the picker flows would use an nullopt
    • the browser flows would have to set it to true, except for the upcoming signin in interception. We can even CHECK in the browser that if the browser is set then the optional must have a value.

    What do you think? Maybe I can re-work this with the interception bubble CL?

    Anthi Orfanou

    Converted to an optional, let's revisit when we consume this for a valid use case where we want to skip.

    Anthi Orfanou

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Ryan Sultanem
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement 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: I78dcc7539b996b7d11c32293115acb8d8deec4b9
      Gerrit-Change-Number: 7105822
      Gerrit-PatchSet: 17
      Gerrit-Owner: Anthi Orfanou <ant...@google.com>
      Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
      Gerrit-Reviewer: Ryan Sultanem <rs...@google.com>
      Gerrit-Attention: Ryan Sultanem <rs...@google.com>
      Gerrit-Comment-Date: Wed, 05 Nov 2025 14:03:47 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      open
      diffy

      Anthi Orfanou (Gerrit)

      unread,
      Nov 5, 2025, 9:04:09 AM (2 days ago) Nov 5
      to Ryan Sultanem, Chromium LUCI CQ, chromium...@chromium.org
      Attention needed from Ryan Sultanem

      Anthi Orfanou voted Commit-Queue+2

      Commit-Queue+2
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Ryan Sultanem
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement 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: I78dcc7539b996b7d11c32293115acb8d8deec4b9
      Gerrit-Change-Number: 7105822
      Gerrit-PatchSet: 17
      Gerrit-Owner: Anthi Orfanou <ant...@google.com>
      Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
      Gerrit-Reviewer: Ryan Sultanem <rs...@google.com>
      Gerrit-Attention: Ryan Sultanem <rs...@google.com>
      Gerrit-Comment-Date: Wed, 05 Nov 2025 14:03:53 +0000
      Gerrit-HasComments: No
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Ryan Sultanem (Gerrit)

      unread,
      Nov 5, 2025, 9:15:03 AM (2 days ago) Nov 5
      to Anthi Orfanou, Chromium LUCI CQ, chromium...@chromium.org
      Attention needed from Anthi Orfanou

      Ryan Sultanem voted and added 1 comment

      Votes added by Ryan Sultanem

      Code-Review+1

      1 comment

      File chrome/browser/ui/views/profiles/profile_picker_post_sign_in_adapter.cc
      Line 329, Patchset 14: /*browser=*/nullptr, /*should_close_modal_dialog=*/false,
      Ryan Sultanem . resolved

      Just confirming: Is this expected?

      My understanding from the commit message is that this param should be used only for testing for now, but in a later change it will actually be used in production.

      2 points:

      • If it will not be used in production, maybe we can think of a cleaner solution? Please ignore if it is actually needed.
      • Is this changing the behavior for the Profile Picker flow? Or is it ignored for this flow as there are no browsers?

      Maybe an idea could be to reuse `HistorySyncOptinLaunchContext` somehow? E.g. for test add a new value maybe? This could be more explicit. Just an idea, I am not fully aware on how this could be used later on.

      Assume this as a question/non blocking comment - just sharing ideas.

      Anthi Orfanou

      Yes, the value will be used in production for the case of the signin interception which should not close the dialog.

      In the profile picker the value does not matter at all:
      If there is a null browser there is no modal dialog attached to the browser to close.

      For consistency I can change this to true (previous behaviour) and add a comment that the value is ignored if browser is null. My suggestion would be to turn this to an optional:

      • the picker flows would use an nullopt
      • the browser flows would have to set it to true, except for the upcoming signin in interception. We can even CHECK in the browser that if the browser is set then the optional must have a value.

      What do you think? Maybe I can re-work this with the interception bubble CL?

      Anthi Orfanou

      Converted to an optional, let's revisit when we consume this for a valid use case where we want to skip.

      Anthi Orfanou

      Done

      Ryan Sultanem

      SGTM! Sorry for the late reply.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Anthi Orfanou
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement 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: I78dcc7539b996b7d11c32293115acb8d8deec4b9
      Gerrit-Change-Number: 7105822
      Gerrit-PatchSet: 17
      Gerrit-Owner: Anthi Orfanou <ant...@google.com>
      Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
      Gerrit-Reviewer: Ryan Sultanem <rs...@google.com>
      Gerrit-Attention: Anthi Orfanou <ant...@google.com>
      Gerrit-Comment-Date: Wed, 05 Nov 2025 14:14:47 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      open
      diffy

      Chromium LUCI CQ (Gerrit)

      unread,
      Nov 5, 2025, 10:00:02 AM (2 days ago) Nov 5
      to Anthi Orfanou, Ryan Sultanem, chromium...@chromium.org

      Chromium LUCI CQ submitted the change

      Change information

      Commit message:
      Disable history sync buttons after click and close dialog optionally

      This CL makes the closure of the modal dialog, displaying the
      history sync optin screen, conditional (through a dedicated
      argument). This a a pre-requisite of 418143300, where interacting
      with the dialog button should not close the hosting dialog. Here
      it facilitates easier testing for the button disabling.

      The main functional change is button disabling, after the first click, to prevent double-clicking.
      The first click triggers an one-off history sync optin flow.
      Bug: 456458942, 418143300
      Change-Id: I78dcc7539b996b7d11c32293115acb8d8deec4b9
      Commit-Queue: Anthi Orfanou <ant...@google.com>
      Auto-Submit: Anthi Orfanou <ant...@google.com>
      Reviewed-by: Ryan Sultanem <rs...@google.com>
      Cr-Commit-Position: refs/heads/main@{#1540616}
      Files:
      • M chrome/browser/resources/signin/history_sync_optin/history_sync_optin_app.html.ts
      • M chrome/browser/resources/signin/history_sync_optin/history_sync_optin_app.ts
      • M chrome/browser/ui/signin/signin_view_controller.cc
      • M chrome/browser/ui/signin/signin_view_controller.h
      • M chrome/browser/ui/signin/signin_view_controller_delegate.h
      • M chrome/browser/ui/signin/signin_view_controller_interactive_uitest.cc
      • M chrome/browser/ui/views/profiles/history_sync_optin_ui_browsertest.cc
      • M chrome/browser/ui/views/profiles/profile_picker_post_sign_in_adapter.cc
      • M chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.cc
      • M chrome/browser/ui/views/profiles/signin_view_controller_delegate_views.h
      • M chrome/browser/ui/webui/signin/history_sync_optin/history_sync_optin_handler.cc
      • M chrome/browser/ui/webui/signin/history_sync_optin/history_sync_optin_handler.h
      • M chrome/browser/ui/webui/signin/history_sync_optin/history_sync_optin_handler_unittest.cc
      • M chrome/browser/ui/webui/signin/history_sync_optin/history_sync_optin_ui.cc
      • M chrome/browser/ui/webui/signin/history_sync_optin/history_sync_optin_ui.h
      • M chrome/browser/ui/webui/signin/history_sync_optin_service.cc
      Change size: M
      Delta: 16 files changed, 150 insertions(+), 12 deletions(-)
      Branch: refs/heads/main
      Submit Requirements:
      • requirement satisfiedCode-Review: +1 by Ryan Sultanem
      Open in Gerrit
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: merged
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I78dcc7539b996b7d11c32293115acb8d8deec4b9
      Gerrit-Change-Number: 7105822
      Gerrit-PatchSet: 18
      Gerrit-Owner: Anthi Orfanou <ant...@google.com>
      Gerrit-Reviewer: Anthi Orfanou <ant...@google.com>
      Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Reviewer: Ryan Sultanem <rs...@google.com>
      open
      diffy
      satisfied_requirement
      Reply all
      Reply to author
      Forward
      0 new messages