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

Issue 246253014: Remove friend classes from PasswordStore. (Closed)

Created:
6 years, 8 months ago by vasilii
Modified:
6 years, 7 months ago
CC:
chromium-reviews, tim+watch_chromium.org, haitaol+watch_chromium.org, maniscalco+watch_chromium.org
Visibility:
Public.

Description

Remove friend classes from PasswordStore. BUG=307750 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=268168

Patch Set 1 #

Total comments: 13

Patch Set 2 : comments #

Total comments: 2

Patch Set 3 : Added DCHECKs and made methods protected #

Total comments: 4

Patch Set 4 : protected inheritance #

Total comments: 8

Patch Set 5 : nits #

Messages

Total messages: 24 (0 generated)
vasilii
Hi, please review Ilya: password_manager Nicolas: sync
6 years, 8 months ago (2014-04-23 16:54:41 UTC) #1
Nicolas Zea
sync lgtm
6 years, 8 months ago (2014-04-23 19:43:15 UTC) #2
Ilya Sherman
I don't think this is the right approach (see inline). Instead, we should decide which ...
6 years, 8 months ago (2014-04-23 20:40:45 UTC) #3
Mike Mammarella
https://codereview.chromium.org/246253014/diff/1/components/password_manager/core/browser/password_store_sync.h File components/password_manager/core/browser/password_store_sync.h (right): https://codereview.chromium.org/246253014/diff/1/components/password_manager/core/browser/password_store_sync.h#newcode19 components/password_manager/core/browser/password_store_sync.h:19: public: On 2014/04/23 20:40:46, Ilya Sherman wrote: > You've ...
6 years, 8 months ago (2014-04-24 00:08:17 UTC) #4
vasilii
Ilya: I didn't understand your proposal. Do you want to return PasswordStoreSync from PasswordStoreFactory::GetForProfile? It's ...
6 years, 8 months ago (2014-04-24 15:04:52 UTC) #5
Ilya Sherman
Fundamentally, I think we should figure out for certain whether calls to these methods are ...
6 years, 8 months ago (2014-04-25 00:27:18 UTC) #6
vasilii
It's mostly about calling on the background thread. ScheduleTask - can be public FillAutofillableLogins - ...
6 years, 8 months ago (2014-04-25 09:03:14 UTC) #7
Ilya Sherman
On 2014/04/25 09:03:14, vasilii wrote: > It's mostly about calling on the background thread. > ...
6 years, 8 months ago (2014-04-25 18:22:01 UTC) #8
vasilii
NotifyLoginsChanged contains this check. Do you want to add the check to all private methods ...
6 years, 7 months ago (2014-04-28 15:18:32 UTC) #9
Ilya Sherman
https://codereview.chromium.org/246253014/diff/1/components/password_manager/core/browser/password_store_sync.h File components/password_manager/core/browser/password_store_sync.h (right): https://codereview.chromium.org/246253014/diff/1/components/password_manager/core/browser/password_store_sync.h#newcode19 components/password_manager/core/browser/password_store_sync.h:19: public: On 2014/04/28 15:18:32, vasilii wrote: > On 2014/04/24 ...
6 years, 7 months ago (2014-04-28 21:38:47 UTC) #10
vasilii
I added DCHECKs to examine the current thread. https://codereview.chromium.org/246253014/diff/1/components/password_manager/core/browser/password_store_sync.h File components/password_manager/core/browser/password_store_sync.h (right): https://codereview.chromium.org/246253014/diff/1/components/password_manager/core/browser/password_store_sync.h#newcode19 components/password_manager/core/browser/password_store_sync.h:19: public: ...
6 years, 7 months ago (2014-04-29 11:14:04 UTC) #11
Ilya Sherman
https://codereview.chromium.org/246253014/diff/1/components/password_manager/core/browser/password_store_sync.h File components/password_manager/core/browser/password_store_sync.h (right): https://codereview.chromium.org/246253014/diff/1/components/password_manager/core/browser/password_store_sync.h#newcode19 components/password_manager/core/browser/password_store_sync.h:19: public: On 2014/04/29 11:14:04, vasilii wrote: > On 2014/04/28 ...
6 years, 7 months ago (2014-04-29 20:35:01 UTC) #12
vasilii
https://codereview.chromium.org/246253014/diff/1/components/password_manager/core/browser/password_store_sync.h File components/password_manager/core/browser/password_store_sync.h (right): https://codereview.chromium.org/246253014/diff/1/components/password_manager/core/browser/password_store_sync.h#newcode19 components/password_manager/core/browser/password_store_sync.h:19: public: On 2014/04/29 20:35:01, Ilya Sherman wrote: > On ...
6 years, 7 months ago (2014-04-30 14:50:50 UTC) #13
Mike Mammarella
I'm still not convinced the deadlock potential is actually resolved, but this arrangement doesn't seem ...
6 years, 7 months ago (2014-04-30 17:35:50 UTC) #14
Ilya Sherman
https://codereview.chromium.org/246253014/diff/60001/components/password_manager/core/browser/password_store.h File components/password_manager/core/browser/password_store.h (right): https://codereview.chromium.org/246253014/diff/60001/components/password_manager/core/browser/password_store.h#newcode200 components/password_manager/core/browser/password_store.h:200: // These will be run in PasswordStore's own thread. ...
6 years, 7 months ago (2014-05-01 00:10:07 UTC) #15
vasilii
On 2014/04/30 17:35:50, Mike Mammarella wrote: > I'm still not convinced the deadlock potential is ...
6 years, 7 months ago (2014-05-02 11:45:37 UTC) #16
vasilii
https://codereview.chromium.org/246253014/diff/60001/components/password_manager/core/browser/password_store.h File components/password_manager/core/browser/password_store.h (right): https://codereview.chromium.org/246253014/diff/60001/components/password_manager/core/browser/password_store.h#newcode200 components/password_manager/core/browser/password_store.h:200: // These will be run in PasswordStore's own thread. ...
6 years, 7 months ago (2014-05-02 11:45:51 UTC) #17
Ilya Sherman
LGTM, thanks.
6 years, 7 months ago (2014-05-02 23:13:58 UTC) #18
Mike Mammarella
On 2014/05/02 11:45:37, vasilii wrote: > On 2014/04/30 17:35:50, Mike Mammarella wrote: > > I'm ...
6 years, 7 months ago (2014-05-03 21:10:24 UTC) #19
vasilii
On 2014/05/03 21:10:24, Mike Mammarella wrote: > On 2014/05/02 11:45:37, vasilii wrote: > > On ...
6 years, 7 months ago (2014-05-05 10:59:45 UTC) #20
vasilii
The CQ bit was checked by vasilii@chromium.org
6 years, 7 months ago (2014-05-05 11:00:00 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/vasilii@chromium.org/246253014/80001
6 years, 7 months ago (2014-05-05 11:00:16 UTC) #22
commit-bot: I haz the power
Change committed as 268168
6 years, 7 months ago (2014-05-05 13:29:08 UTC) #23
Mike Mammarella
6 years, 7 months ago (2014-05-06 17:51:40 UTC) #24
Well, it's related to sync in that sync is the only code that calls these
formerly-private synchronous methods, so it has to work correctly even when
these methods block for such long times. But with the checks that they're
only called on the right threads I think it'll be fine, as long as they
don't hold any sync-wide locks.


On Mon, May 5, 2014 at 3:59 AM, <vasilii@chromium.org> wrote:

> On 2014/05/03 21:10:24, Mike Mammarella wrote:
>
>> On 2014/05/02 11:45:37, vasilii wrote:
>> > On 2014/04/30 17:35:50, Mike Mammarella wrote:
>> > > I'm still not convinced the deadlock potential is actually resolved,
>> but
>> this
>> > > arrangement doesn't seem any worse than the current state, either.
>> (Except
>> in
>> > > that it gets rid of the friend declarations, which were a reminder of
>> the
>> > > underlying problem. It remains the case that you don't really get any
>> > guarantees
>> > > by using the synchronous methods; the data can still be modified from
>> outside
>> > > the process.)
>> > >
>> > > That being said, this looks fine to me.
>> > >
>> > >
>> >
>>
>
> https://codereview.chromium.org/246253014/diff/60001/
> components/password_manager/core/browser/password_store_sync.h
>
>> > > File components/password_manager/core/browser/password_store_sync.h
>>
> (right):
>
>> > >
>> > >
>> >
>>
>
> https://codereview.chromium.org/246253014/diff/60001/
> components/password_manager/core/browser/password_store_sync.h#newcode16
>
>> > > components/password_manager/core/browser/password_store_sync.h:16: //
>> classes.
>> > > It seems worthwhile to also mention the thread restrictions that apply
>>
> when
>
>> > > calling these methods.
>> >
>> > Mike, what deadlock and guarantees you are talking about?
>> > The sqlite database is locked while the profile is open.
>>
>
>  On Linux and OS X, the passwords are not stored in the sqlite database.
>> On OS
>>
> X,
>
>> all the metadata is, but the passwords themselves are stored in the user's
>> keychain. On Linux, nothing is stored in the sqlite database at all;
>>
> everything
>
>> is stored in either GNOME Keyring or KWallet (depending on the desktop
>> environment). These services can be accessed at any time by any other
>> process,
>> and access to them may block indefinitely waiting for the user's input.
>>
>
> This is a known issue not related to sync. For example, Chrome can't
> shutdown on
> OS X if user doesn't close the Keychain message box. I don't think it's a
> bug
> BTW.
>
> https://codereview.chromium.org/246253014/
>

To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698