Move MediaDeviceIDSalt from ProfileIOData to ProfileImpl.
The object is never used on the IO thread, and even had DCHECKs to
ensure that's the case, so it makes no sense in ProfileIOData.
It's also one of the few things exposed by ResourceContext, which we're
probably going to get rid of.
BUG=712296
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
Review-Url: https://codereview.chromium.org/2820163002
Cr-Commit-Position: refs/heads/master@{#466358}
Committed: https://chromium.googlesource.com/chromium/src/+/c0b2b8b1b919b0fcda51e691406d50a62f89771d
Dry run: Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/398131)
3 years, 8 months ago
(2017-04-17 19:47:55 UTC)
#4
Description was changed from ========== No salt No salt BUG= ========== to ========== No salt ...
3 years, 8 months ago
(2017-04-17 20:55:51 UTC)
#5
Description was changed from
==========
No salt
No salt
BUG=
==========
to
==========
No salt
No salt
BUG=
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
==========
mmenke
The CQ bit was checked by mmenke@chromium.org to run a CQ dry run
3 years, 8 months ago
(2017-04-17 20:56:04 UTC)
#6
Description was changed from ========== No salt No salt BUG= CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation ========== to ========== The ...
3 years, 8 months ago
(2017-04-17 20:58:13 UTC)
#8
Description was changed from
==========
No salt
No salt
BUG=
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
==========
to
==========
The object is never used on the IO thread, and even had DCHECKs to
ensure that's the case, so it makes no sense in ProfileIOData.
It's also one of the few things exposed by ResourceContext, which we're
probably going to get rid of.
BUG=712296
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
==========
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
3 years, 8 months ago
(2017-04-17 21:09:16 UTC)
#9
Dry run: Try jobs failed on following builders: chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_chromium_compile_only_ng/builds/320809) mac_chromium_compile_dbg_ng on ...
3 years, 8 months ago
(2017-04-17 21:09:16 UTC)
#10
Dry run: Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-generic_chromium_compile_only_ng/builds/320957) linux_chromium_chromeos_rel_ng on ...
3 years, 8 months ago
(2017-04-17 21:58:52 UTC)
#16
[tommi]: Please review everything. [mlerman]: Please review profiles/profile_impl.* (I own the directory, but only for ...
3 years, 8 months ago
(2017-04-18 18:52:16 UTC)
#23
[tommi]: Please review everything.
[mlerman]: Please review profiles/profile_impl.* (I own the directory, but only
for ProfileIOData, and I'm not going to take advantage of that to ignore the big
scary warning). Happy for suggestions on how to better get this stuff out of
ProfileIOData.
https://codereview.chromium.org/2820163002/diff/70001/chrome/browser/profiles...
File chrome/browser/profiles/profile_impl.h (right):
https://codereview.chromium.org/2820163002/diff/70001/chrome/browser/profiles...
chrome/browser/profiles/profile_impl.h:258: // STOP!!!! DO NOT ADD ANY MORE
ITEMS HERE!!!!
Note that I'm ignoring this, largely because this is already part of a content/
API, and I'm unaware of a good way to make this a service (Note that it has
consumers in chrome and content, a default behavior, and a special pref-based
behavior when run in Chrome).
I agree moving it makes sense, but I'm also reluctant to redesign a service I
neither own nor understand - I just want to remove the code from ProfileIOData,
as it's an even worse spot than here. If someone on the media team that owns
the MediaDeviceIDSalt wants to do a more principled approach, I'm happy to hand
it off or work together on a better design.
Mike Lerman
https://codereview.chromium.org/2820163002/diff/70001/chrome/browser/profiles/profile_impl.h File chrome/browser/profiles/profile_impl.h (right): https://codereview.chromium.org/2820163002/diff/70001/chrome/browser/profiles/profile_impl.h#newcode258 chrome/browser/profiles/profile_impl.h:258: // STOP!!!! DO NOT ADD ANY MORE ITEMS HERE!!!! ...
3 years, 8 months ago
(2017-04-18 19:09:46 UTC)
#24
https://codereview.chromium.org/2820163002/diff/70001/chrome/browser/profiles...
File chrome/browser/profiles/profile_impl.h (right):
https://codereview.chromium.org/2820163002/diff/70001/chrome/browser/profiles...
chrome/browser/profiles/profile_impl.h:258: // STOP!!!! DO NOT ADD ANY MORE
ITEMS HERE!!!!
On 2017/04/18 18:52:16, mmenke wrote:
> Note that I'm ignoring this, largely because this is already part of a
content/
> API, and I'm unaware of a good way to make this a service (Note that it has
> consumers in chrome and content, a default behavior, and a special pref-based
> behavior when run in Chrome).
>
> I agree moving it makes sense, but I'm also reluctant to redesign a service I
> neither own nor understand - I just want to remove the code from
ProfileIOData,
> as it's an even worse spot than here. If someone on the media team that owns
> the MediaDeviceIDSalt wants to do a more principled approach, I'm happy to
hand
> it off or work together on a better design.
webrtc_audio_private_api.cc is the only place in Chrome that needs to care about
the MediaDeviceIDSalt object or preference. Can we have that class either hold
the reference to the object (in place of the Profile) or just interact with, and
manage, the pref directly?
It seems like the answer here is that, since there's only one place in
chrome/browser that needs to care, to push the responsibility out of Profile
into there. It seems like, logically, the results would be equivalent; and while
we're going to the effort to move this logic out of profile_io_data, let's move
it out of chrome/browser/profiles completely.
mmenke
https://codereview.chromium.org/2820163002/diff/70001/chrome/browser/profiles/profile_impl.h File chrome/browser/profiles/profile_impl.h (right): https://codereview.chromium.org/2820163002/diff/70001/chrome/browser/profiles/profile_impl.h#newcode258 chrome/browser/profiles/profile_impl.h:258: // STOP!!!! DO NOT ADD ANY MORE ITEMS HERE!!!! ...
3 years, 8 months ago
(2017-04-18 20:04:57 UTC)
#25
https://codereview.chromium.org/2820163002/diff/70001/chrome/browser/profiles...
File chrome/browser/profiles/profile_impl.h (right):
https://codereview.chromium.org/2820163002/diff/70001/chrome/browser/profiles...
chrome/browser/profiles/profile_impl.h:258: // STOP!!!! DO NOT ADD ANY MORE
ITEMS HERE!!!!
On 2017/04/18 19:09:46, Mike Lerman wrote:
> On 2017/04/18 18:52:16, mmenke wrote:
> > Note that I'm ignoring this, largely because this is already part of a
> content/
> > API, and I'm unaware of a good way to make this a service (Note that it has
> > consumers in chrome and content, a default behavior, and a special
pref-based
> > behavior when run in Chrome).
> >
> > I agree moving it makes sense, but I'm also reluctant to redesign a service
I
> > neither own nor understand - I just want to remove the code from
> ProfileIOData,
> > as it's an even worse spot than here. If someone on the media team that
owns
> > the MediaDeviceIDSalt wants to do a more principled approach, I'm happy to
> hand
> > it off or work together on a better design.
>
> webrtc_audio_private_api.cc is the only place in Chrome that needs to care
about
> the MediaDeviceIDSalt object or preference. Can we have that class either hold
> the reference to the object (in place of the Profile) or just interact with,
and
> manage, the pref directly?
>
> It seems like the answer here is that, since there's only one place in
> chrome/browser that needs to care, to push the responsibility out of Profile
> into there. It seems like, logically, the results would be equivalent; and
while
> we're going to the effort to move this logic out of profile_io_data, let's
move
> it out of chrome/browser/profiles completely.
Are you sure? Looks like
content/browser/renderer_host/render_process_host_impl.cc passes it to the
AudioRendererHost and MediaStreamDispatcherHost
3 years, 8 months ago
(2017-04-19 10:45:40 UTC)
#27
Guido - can you take a look?
Guido Urdaneta
lgtm
3 years, 8 months ago
(2017-04-19 10:55:41 UTC)
#28
lgtm
Mike Lerman
Given neither of us is familiar with the intricacies of this change, are we confident ...
3 years, 8 months ago
(2017-04-19 14:50:16 UTC)
#29
Given neither of us is familiar with the intricacies of this change, are we
confident we're not introducing bad behavior?
I would strongly prefer that if this is being moved, it is done properly as some
sort of BrowserContextKeyedService/ProfileKeyedService. I understand you're
comment that we're just moving it from one profile entity to another, but at
least where it is now, we know everything works :)
mmenke
On 2017/04/19 14:50:16, Mike Lerman wrote: > Given neither of us is familiar with the ...
3 years, 8 months ago
(2017-04-19 15:07:58 UTC)
#30
On 2017/04/19 14:50:16, Mike Lerman wrote:
> Given neither of us is familiar with the intricacies of this change, are we
> confident we're not introducing bad behavior?
>
> I would strongly prefer that if this is being moved, it is done properly as
some
> sort of BrowserContextKeyedService/ProfileKeyedService. I understand you're
> comment that we're just moving it from one profile entity to another, but at
> least where it is now, we know everything works :)
I think this makes sense, unfortunately, I don't know a better design, given
that this is used in content/. Given another design (Or a pointer to other
things that do this), I'm happy to do the right thing, and implement it. We're
working towards getting rid of ResourceContext completely (And hopefully
ProfileIOData as well), so it can't stay where it is.
As for correctness: It has DCHECKs that it's never used on the IO thread, and
the only production uses of it (In
/content/browser/renderer_host/render_process_host_impl.cc,
chrome/browser/extensions/api/webrtc_audio_private/webrtc_audio_private_api.cc,
and extensions/browser/api/webcam_private/webcam_private_api_chromeos.cc) use
profile->GetResourceContext()->GetMediaDeviceIDSalt() all one one line, so we're
not introducing any profile/BrowserContext dereferences that would suddenly be
happening on another thread.
For startup, I initialize it earlier than it was initialized before, so no new
races there.
For shutdown, I put it after prefs_ (Which it depends on), so it's destroyed and
stops watching prefs before prefs are destroyed. It's also destroyed later than
when it used to be (End of profile destructor, as opposed to when profile tells
the ProfileIOData to be torn down).
Any other potential problem I should be on the lookout for?
Guido Urdaneta
I did not author this code, but have worked on it before (I changed the ...
3 years, 8 months ago
(2017-04-19 15:15:00 UTC)
#31
I did not author this code, but have worked on it before (I changed the return
value from a callback to a string and the default behavior from an empty string
to a random string in https://codereview.chromium.org/1987643002/). IMO, this CL
is an improvement over the current situation. I don't think it is introducing
bad behavior.
Mike Lerman
WDYT about creating a bug (tagged against both profiles and media components) and leaving a ...
3 years, 8 months ago
(2017-04-20 13:30:40 UTC)
#32
WDYT about creating a bug (tagged against both profiles and media components)
and leaving a TODO against that bug to migrate this out of c/b/profiles and into
some sort of KeyedService?
I'm sure there is a way to use either BrowserContextKeyedServices or
ProfileKeyedServices to achieve our goals; I've been out of Chrome for too long
to have a good intuition of what this is, but I'm sure there is one.
Guido Urdaneta
On 2017/04/20 13:30:40, Mike Lerman wrote: > WDYT about creating a bug (tagged against both ...
3 years, 8 months ago
(2017-04-20 14:14:54 UTC)
#33
On 2017/04/20 13:30:40, Mike Lerman wrote:
> WDYT about creating a bug (tagged against both profiles and media components)
> and leaving a TODO against that bug to migrate this out of c/b/profiles and
into
> some sort of KeyedService?
>
> I'm sure there is a way to use either BrowserContextKeyedServices or
> ProfileKeyedServices to achieve our goals; I've been out of Chrome for too
long
> to have a good intuition of what this is, but I'm sure there is one.
SGTM. You can assign the bug to me.
mmenke
On 2017/04/20 14:14:54, Guido Urdaneta wrote: > On 2017/04/20 13:30:40, Mike Lerman wrote: > > ...
3 years, 8 months ago
(2017-04-20 15:11:24 UTC)
#34
On 2017/04/20 14:14:54, Guido Urdaneta wrote:
> On 2017/04/20 13:30:40, Mike Lerman wrote:
> > WDYT about creating a bug (tagged against both profiles and media
components)
> > and leaving a TODO against that bug to migrate this out of c/b/profiles and
> into
> > some sort of KeyedService?
> >
> > I'm sure there is a way to use either BrowserContextKeyedServices or
> > ProfileKeyedServices to achieve our goals; I've been out of Chrome for too
> long
> > to have a good intuition of what this is, but I'm sure there is one.
>
> SGTM. You can assign the bug to me.
SGTM, too. Filed bug, added TODO.
[+jochen]: Please review content/browser (Moving something from ResourceContext to BrowserContext - ResourceContext is going away, ...
3 years, 8 months ago
(2017-04-20 15:13:50 UTC)
#36
[+jochen]: Please review content/browser (Moving something from ResourceContext
to BrowserContext - ResourceContext is going away, and should only be used on
the IO thread, anyways, and this is a UI-thread method).
[+rdevlin.cronin]: Please review browser/extensions/api/webrtc_audio_private/
[+zork]: Please review
extensions/browser/api/webcam_private/webcam_private_api_chromeos.cc
Thanks!
Devlin
extensions lgtm Description Nit: The first line of the CL description field in Rietveld is ...
3 years, 8 months ago
(2017-04-20 15:39:15 UTC)
#37
extensions lgtm
Description Nit:
The first line of the CL description field in Rietveld is what becomes the
commit title, so right now this would be committed with a title of "The object
is never used on the IO thread, and even had DCHECKs to". Can you format the
description to include the title?
<Title>
<Description>
BUG=<nnn>
mmenke
Description was changed from ========== The object is never used on the IO thread, and ...
3 years, 8 months ago
(2017-04-20 15:41:46 UTC)
#38
Description was changed from
==========
The object is never used on the IO thread, and even had DCHECKs to
ensure that's the case, so it makes no sense in ProfileIOData.
It's also one of the few things exposed by ResourceContext, which we're
probably going to get rid of.
BUG=712296
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
==========
to
==========
Move MediaDeviceIDSalt from ProfileIOData to ProfileImpl.
The object is never used on the IO thread, and even had DCHECKs to
ensure that's the case, so it makes no sense in ProfileIOData.
It's also one of the few things exposed by ResourceContext, which we're
probably going to get rid of.
BUG=712296
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
==========
mmenke
On 2017/04/20 15:39:15, Devlin wrote: > extensions lgtm > > Description Nit: > > The ...
3 years, 8 months ago
(2017-04-20 15:42:59 UTC)
#39
On 2017/04/20 15:39:15, Devlin wrote:
> extensions lgtm
>
> Description Nit:
>
> The first line of the CL description field in Rietveld is what becomes the
> commit title, so right now this would be committed with a title of "The object
> is never used on the IO thread, and even had DCHECKs to". Can you format the
> description to include the title?
> <Title>
>
> <Description>
>
> BUG=<nnn>
Done. I blame our tooling - note that the issue title was what should have been
on the first line, but was not there, for some reason.
Devlin
On 2017/04/20 15:42:59, mmenke wrote: > On 2017/04/20 15:39:15, Devlin wrote: > > extensions lgtm ...
3 years, 8 months ago
(2017-04-20 16:07:48 UTC)
#40
On 2017/04/20 15:42:59, mmenke wrote:
> On 2017/04/20 15:39:15, Devlin wrote:
> > extensions lgtm
> >
> > Description Nit:
> >
> > The first line of the CL description field in Rietveld is what becomes the
> > commit title, so right now this would be committed with a title of "The
object
> > is never used on the IO thread, and even had DCHECKs to". Can you format
the
> > description to include the title?
> > <Title>
> >
> > <Description>
> >
> > BUG=<nnn>
>
> Done. I blame our tooling - note that the issue title was what should have
been
> on the first line, but was not there, for some reason.
In my experience, this is usually because I change the description post-upload
and forget to put the title. git cl upload will do the right thing, but if you
edit the description by hand, it won't auto-add the title back.
Zachary Kuznia
lgtm
3 years, 8 months ago
(2017-04-20 16:10:54 UTC)
#41
lgtm
Mike Lerman
lgtm, thanks for filing the bug
3 years, 8 months ago
(2017-04-20 16:53:27 UTC)
#42
lgtm, thanks for filing the bug
jochen (gone - plz use gerrit)
lgtm
3 years, 8 months ago
(2017-04-21 08:38:45 UTC)
#43
lgtm
mmenke
The CQ bit was checked by mmenke@chromium.org
3 years, 8 months ago
(2017-04-21 11:42:38 UTC)
#44
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/417451) mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 8 months ago
(2017-04-21 11:45:44 UTC)
#48
The patchset sent to the CQ was uploaded after l-g-t-m from rdevlin.cronin@chromium.org, jochen@chromium.org, mlerman@chromium.org, zork@chromium.org, ...
3 years, 8 months ago
(2017-04-21 15:26:58 UTC)
#50
CQ is committing da patch. Bot data: {"patchset_id": 130001, "attempt_start_ts": 1492788418211260, "parent_rev": "0d5af94346c215cb917920baced6c06bb9110e61", "commit_rev": "c0b2b8b1b919b0fcda51e691406d50a62f89771d"}
3 years, 8 months ago
(2017-04-21 16:27:55 UTC)
#52
CQ is committing da patch.
Bot data: {"patchset_id": 130001, "attempt_start_ts": 1492788418211260,
"parent_rev": "0d5af94346c215cb917920baced6c06bb9110e61", "commit_rev":
"c0b2b8b1b919b0fcda51e691406d50a62f89771d"}
commit-bot: I haz the power
Description was changed from ========== Move MediaDeviceIDSalt from ProfileIOData to ProfileImpl. The object is never ...
3 years, 8 months ago
(2017-04-21 16:28:10 UTC)
#53
Message was sent while issue was closed.
Description was changed from
==========
Move MediaDeviceIDSalt from ProfileIOData to ProfileImpl.
The object is never used on the IO thread, and even had DCHECKs to
ensure that's the case, so it makes no sense in ProfileIOData.
It's also one of the few things exposed by ResourceContext, which we're
probably going to get rid of.
BUG=712296
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
==========
to
==========
Move MediaDeviceIDSalt from ProfileIOData to ProfileImpl.
The object is never used on the IO thread, and even had DCHECKs to
ensure that's the case, so it makes no sense in ProfileIOData.
It's also one of the few things exposed by ResourceContext, which we're
probably going to get rid of.
BUG=712296
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation
Review-Url: https://codereview.chromium.org/2820163002
Cr-Commit-Position: refs/heads/master@{#466358}
Committed:
https://chromium.googlesource.com/chromium/src/+/c0b2b8b1b919b0fcda51e691406d...
==========
commit-bot: I haz the power
Committed patchset #7 (id:130001) as https://chromium.googlesource.com/chromium/src/+/c0b2b8b1b919b0fcda51e691406d50a62f89771d
3 years, 8 months ago
(2017-04-21 16:28:12 UTC)
#54
Issue 2820163002: Move MediaDeviceIDSalt from ProfileIOData to ProfileImpl.
(Closed)
Created 3 years, 8 months ago by mmenke
Modified 3 years, 8 months ago
Reviewers: jochen (gone - plz use gerrit), Guido Urdaneta, Mike Lerman, Devlin, tommi (sloooow) - chröme, Zachary Kuznia
Base URL:
Comments: 3