Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Issue 2344943002: Make ChromePasswordManagerClient::BindCredentialManager handle missing client gracefully (Closed)

Created:
4 years, 3 months ago by vabr (Chromium)
Modified:
4 years, 2 months ago
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make ChromePasswordManagerClient::BindCredentialManager handle missing client gracefully ChromeContentBrowserClient::RegisterRenderFrameMojoInterfaces associates binding methods with Mojo interfaces. It does so for newly created RenderFrameHost (RFH) instances. During that time, the WebContents associated with such RFH also may or may not get some tab helpers attached. The order of attaching the tab helpers and calling ChromeContentBrowserClient::RegisterRenderFrameMojoInterfaces is not specified. The binding methods are often implemented by the tab helpers, as is the case of ChromePasswordManagerClient in particular. The binding methods are static, but might attempt to call non-static methods on the tab helpers. Because ChromeContentBrowserClient::RegisterRenderFrameMojoInterfaces might be called before the tab helpers are added, there is no way ChromeContentBrowserClient::RegisterRenderFrameMojoInterfaces could tell whether the tab helper will be available once the Mojo interface will be interacted with. Therefore ChromeContentBrowserClient::RegisterRenderFrameMojoInterfaces must always associate the binding method with the interface. In the cases where the tab helper does not get created, the binding method needs to be able to handle its absence gracefully. This is the case for, e.g., ChromeTranslateClient or ContentPasswordManagerDriverFactory. It was not the case for ChromePasswordManagerClient, which caused user-reproducible errors. This CL adds the graceful handling to ChromePasswordManagerClient. BUG=644612 Committed: https://crrev.com/316b880c55452eb694a27ba4d1aa9e74ec9ef342 Cr-Commit-Position: refs/heads/master@{#421519}

Patch Set 1 #

Patch Set 2 : Fix Win compile #

Patch Set 3 : Fix missing PasswordManagerDriver interface #

Patch Set 4 : Make ChromePasswordManagerClient::BindCredentialManager handle missing client gracefully #

Unified diffs Side-by-side diffs Delta from patch set Stats (+25 lines, -1 line) Patch
M chrome/browser/password_manager/chrome_password_manager_client.cc View 1 2 3 1 chunk +7 lines, -1 line 0 comments Download
M chrome/browser/password_manager/chrome_password_manager_client_unittest.cc View 1 2 3 1 chunk +18 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (20 generated)
vabr (Chromium)
Hi Ken, This is what I suggested in #9. Could you please take a look? ...
4 years, 3 months ago (2016-09-15 18:21:21 UTC) #4
vabr (Chromium)
On 2016/09/15 18:21:21, vabr (Chromium) wrote: > Hi Ken, > > This is what I ...
4 years, 3 months ago (2016-09-15 18:22:08 UTC) #5
Ken Rockot(use gerrit already)
LGTM as non-owner
4 years, 3 months ago (2016-09-15 18:24:22 UTC) #6
vabr (Chromium)
On 2016/09/15 18:24:22, Ken Rockot wrote: > LGTM as non-owner Thanks! Both files are owned ...
4 years, 3 months ago (2016-09-15 18:37:25 UTC) #7
vabr (Chromium)
On 2016/09/15 18:37:25, vabr (Chromium) wrote: > I will proceed with landing. ...after I fix ...
4 years, 3 months ago (2016-09-15 18:38:24 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2344943002/20001
4 years, 3 months ago (2016-09-15 18:40:26 UTC) #13
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/297142)
4 years, 3 months ago (2016-09-15 19:10:02 UTC) #15
vabr (Chromium)
Sorry to bother you again, Ken. I had to keep binding ContentPasswordManagerDriverFactory::BindPasswordManagerDriver even if ChromePasswordManagerClient ...
4 years, 3 months ago (2016-09-15 19:40:04 UTC) #18
vabr (Chromium)
On 2016/09/15 19:40:04, vabr (OOO until 27 Sep) wrote: > Sorry to bother you again, ...
4 years, 3 months ago (2016-09-15 21:04:22 UTC) #21
vabr (Chromium)
Hello Ken, I did the code changes and modified the CL description accordingly. Could you ...
4 years, 2 months ago (2016-09-28 12:22:41 UTC) #27
Ken Rockot(use gerrit already)
lgtm
4 years, 2 months ago (2016-09-28 14:31:52 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2344943002/60001
4 years, 2 months ago (2016-09-28 14:35:41 UTC) #30
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 2 months ago (2016-09-28 14:40:44 UTC) #32
commit-bot: I haz the power
4 years, 2 months ago (2016-09-28 14:43:06 UTC) #34
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/316b880c55452eb694a27ba4d1aa9e74ec9ef342
Cr-Commit-Position: refs/heads/master@{#421519}

Powered by Google App Engine
This is Rietveld 408576698