New issue
Advanced search Search tips

Issue 777861 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , iOS , Chrome , Mac , Fuchsia
Pri: 3
Type: Task



Sign in to add a comment

PasswordManagerClient and PasswordManagerClientHelperDelegate should not both define the same GetPasswordManager method

Project Member Reported by vabr@chromium.org, Oct 24 2017

Issue description

Currently, both PasswordManagerClient and PasswordManagerClientHelperDelegate define

  PasswordManager* GetPasswordManager()

In PasswordManagerClient this method is non-virtual and defined in terms of a const variant (which is virtual and present in PMC).

In PasswordManagerClientHelperDelegate this method is pure virtual (and there is no const version).

The embedders' implementations of PasswordManagerClient (i.e., ChromePMC and IOSChromePMC) also both inherit PasswordManagerClientHelperDelegate. It seems silly that they currently need to define the override for PasswordManagerClientHelperDelegate::GetPasswormManager and the conveniently inherited PasswordManagerClient::GetPasswordManager is unused. Also, the override is private, so one has to upcast the implementations of PasswordManagerClient to PasswordManagerClient to be able to get the PasswordManager.

The name PasswordManagerClientHelper suggests that it is a helper for a PasswordManagerClient. So it might be reasonable to expect that the delegate is a PasswordManagerClient and so one of the solutions is to merge PasswordManagerClientHelperDelegate and PasswordManagerClient.

Or, both PasswordManagerClient and PasswordManagerClientHelperDelegate are types of an object which is capable of giving PasswordManager pointers. In that case, there should be an interface PasswordManagerDistributor, defining just the GetPasswordManager() accessor, from which both PasswordManagerClient and PasswordManagerClientHelperDelegate derive. We probably need to make that a virtual inheritance, to avoid having duplicities down in the hierarchy.

I'm Cc-ing vasilii@, who might have opinions or other ideas for this issue.
 
Project Member

Comment 1 by sheriffbot@chromium.org, Oct 24

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)

Sign in to add a comment