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

Issue 10342013: Generate and connect a Pepper identifier for Chrome OS (Closed)

Created:
8 years, 7 months ago by drewry
Modified:
8 years, 6 months ago
CC:
chromium-reviews, nkostylev+watch_chromium.org, joi+watch-content_chromium.org, darin-cc_chromium.org, stevenjb+watch_chromium.org, davemoore+watch_chromium.org, zelidrag, battre, markusheintz
Visibility:
Public.

Description

Generate and connect a Pepper identifier for Chrome OS This change wires up GetDeviceID and passes in the BrowserContext into PepperMessageFilter rather than the extracted ResourceContext. The pepper drm identifier is a value provided for use by flash. It may be reset or disabled by the user and cannot function in OffTheRecord embodiments. In Guest mode, the identifier is never generated. When in incognito, the ppapi plugin will be informed of the the profile state and not make the call. Later, this will be enforced in the message filter as well. Note, the preference is currently defaulted to true and does not have a UI connection. The UI is being wired up as part of crbug.com/125899. At which point, we can make the setting syncable and chose the preferred default. This change bounces the GetDeviceID call through the renderer back to the browser so that we have the path context to read the file from. This same approach can be used to allow OTR checking and preference reading if that is preferable to a file. If we need to do anything on the UI thread, we should do everything there (OTR+Pref). Since the ID is regenerated at every pref init/toggle, we can move the value around without impacting users in the future. Please let me know if I've totally botched the wiring for this. I'm not sure the best way to fully test it. TEST=built and tested on x86-alex target: - ID is generated for normal sign-in in /home/chronos/user and is not generated for Guest. - Very lightweight ppapi test was run too. (Still need pointers on better flash api wiring testing to make sure it is seeing right string) - Pepper flash still worked normally Also built full x86-alex system image: - booted it - checked the file existence in both modes - checked pepflash and talk video for normal functionality TRYBOT=http://build.chromium.org/p/tryserver.chromium/builders/cros_x86/builds/353 BUG=chromium-os:30378 Change-Id: Ibfbc484918d94147ad4fdc522a6415c71731068b R=brettw,sky,piman,viettrungluu Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=135255

Patch Set 1 #

Total comments: 10

Patch Set 2 : fixes from battre #

Patch Set 3 : stop using HashPassword as it has legacy behavior. #

Total comments: 21

Patch Set 4 : cleanup as per brettw; move to serializedreturnvar in the host msg bounce step #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+264 lines, -16 lines) Patch
M chrome/browser/chromeos/preferences.h View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/preferences.cc View 1 2 3 4 chunks +14 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/system/drm_settings.h View 1 2 3 1 chunk +18 lines, -0 lines 0 comments Download
A chrome/browser/chromeos/system/drm_settings.cc View 1 2 3 1 chunk +118 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/common/pref_names.h View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/test/ui/ppapi_uitest.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/pepper_message_filter.h View 4 chunks +5 lines, -1 line 0 comments Download
M content/browser/renderer_host/pepper_message_filter.cc View 1 2 3 6 chunks +44 lines, -6 lines 2 comments Download
M content/browser/renderer_host/render_process_host_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/common/pepper_messages.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_delegate_impl.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_delegate_impl.cc View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M ppapi/proxy/ppapi_messages.h View 1 2 3 1 chunk +3 lines, -2 lines 0 comments Download
M ppapi/proxy/ppb_flash_proxy.h View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M ppapi/proxy/ppb_flash_proxy.cc View 1 2 3 3 chunks +18 lines, -4 lines 0 comments Download
M ppapi/tests/test_flash.h View 1 chunk +1 line, -0 lines 0 comments Download
M ppapi/tests/test_flash.cc View 1 2 3 2 chunks +10 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/mock_plugin_delegate.h View 1 chunk +1 line, -0 lines 0 comments Download
M webkit/plugins/ppapi/mock_plugin_delegate.cc View 1 2 3 1 chunk +4 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/plugin_delegate.h View 1 chunk +3 lines, -0 lines 0 comments Download
M webkit/plugins/ppapi/ppb_flash_impl.cc View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
battre
You guys are probably more qualified to do the review than me, so I am ...
8 years, 7 months ago (2012-05-03 09:57:42 UTC) #1
drewry
Thanks! https://chromiumcodereview.appspot.com/10342013/diff/1/content/browser/renderer_host/pepper_message_filter.cc File content/browser/renderer_host/pepper_message_filter.cc (left): https://chromiumcodereview.appspot.com/10342013/diff/1/content/browser/renderer_host/pepper_message_filter.cc#oldcode1 content/browser/renderer_host/pepper_message_filter.cc:1: // Copyright (c) 2012 The Chromium Authors. All ...
8 years, 7 months ago (2012-05-03 13:57:18 UTC) #2
brettw
https://chromiumcodereview.appspot.com/10342013/diff/4024/chrome/browser/chromeos/preferences.cc File chrome/browser/chromeos/preferences.cc (right): https://chromiumcodereview.appspot.com/10342013/diff/4024/chrome/browser/chromeos/preferences.cc#newcode577 chrome/browser/chromeos/preferences.cc:577: system::drm_settings::ToggleDrm( This should fit on one line. https://chromiumcodereview.appspot.com/10342013/diff/4024/chrome/browser/chromeos/system/drm_settings.h File ...
8 years, 7 months ago (2012-05-03 20:34:20 UTC) #3
Will Drewry
Pushing up the new changes. Testing in progress (full x86-alex + loading libppapi_tests.so via test_case.html ...
8 years, 7 months ago (2012-05-03 21:58:48 UTC) #4
brettw
lgtm
8 years, 7 months ago (2012-05-03 22:02:26 UTC) #5
Will Drewry
On 2012/05/03 22:02:26, brettw wrote: > lgtm Thanks! Retested with a full x86-alex build. Ran ...
8 years, 7 months ago (2012-05-03 22:43:18 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/drewry@google.com/10342013/10001
8 years, 7 months ago (2012-05-03 22:53:40 UTC) #7
commit-bot: I haz the power
Change committed as 135255
8 years, 7 months ago (2012-05-04 00:39:20 UTC) #8
jam
http://codereview.chromium.org/10342013/diff/10001/content/browser/renderer_host/pepper_message_filter.cc File content/browser/renderer_host/pepper_message_filter.cc (right): http://codereview.chromium.org/10342013/diff/10001/content/browser/renderer_host/pepper_message_filter.cc#newcode65 content/browser/renderer_host/pepper_message_filter.cc:65: // chrome/browser/chromeos/system/drm_settings.cc this is a layering violation. this code, ...
8 years, 6 months ago (2012-06-01 22:21:05 UTC) #9
jam
http://codereview.chromium.org/10342013/diff/10001/content/browser/renderer_host/pepper_message_filter.cc File content/browser/renderer_host/pepper_message_filter.cc (right): http://codereview.chromium.org/10342013/diff/10001/content/browser/renderer_host/pepper_message_filter.cc#newcode65 content/browser/renderer_host/pepper_message_filter.cc:65: // chrome/browser/chromeos/system/drm_settings.cc On 2012/06/01 22:21:06, John Abd-El-Malek wrote: > ...
8 years, 6 months ago (2012-06-01 22:32:39 UTC) #10
brettw
Let's add a getter for this on BrowserContext. Since I don't think that's threadsafe, let's ...
8 years, 6 months ago (2012-06-01 22:41:39 UTC) #11
jam
On 2012/06/01 22:41:39, brettw wrote: > Let's add a getter for this on BrowserContext. Since ...
8 years, 6 months ago (2012-06-01 22:45:50 UTC) #12
jam
ping? Will: will you be able to get to this soon?
8 years, 6 months ago (2012-06-18 15:04:57 UTC) #13
drewry
On 2012/06/18 15:04:57, John Abd-El-Malek wrote: > ping? Will: will you be able to get ...
8 years, 6 months ago (2012-06-18 15:11:34 UTC) #14
brettw
On Mon, Jun 18, 2012 at 8:11 AM, <drewry@google.com> wrote: > On 2012/06/18 15:04:57, John ...
8 years, 6 months ago (2012-06-18 17:12:25 UTC) #15
drewry
On Mon, Jun 18, 2012 at 12:12 PM, Brett Wilson <brettw@chromium.org> wrote: > On Mon, ...
8 years, 6 months ago (2012-06-18 18:42:25 UTC) #16
brettw
8 years, 6 months ago (2012-06-18 19:01:09 UTC) #17
On Mon, Jun 18, 2012 at 11:42 AM, Will Drewry™ <drewry@google.com> wrote:
> On Mon, Jun 18, 2012 at 12:12 PM, Brett Wilson <brettw@chromium.org> wrote:
>> On Mon, Jun 18, 2012 at 8:11 AM,  <drewry@google.com> wrote:
>>> On 2012/06/18 15:04:57, John Abd-El-Malek wrote:
>>>>
>>>> ping? Will: will you be able to get to this soon?
>>>
>>>
>>> Yep, but I'm not sure if I'll make branch or not yet.
>>>
>>> Now, some continuation of my cluelessness questions :)
>>>
>>> If I put a getter on the BrowserContext and run this on the UI context,
>>> should I
>>> just have it store the device id in a pref value? I can do the generation
in
>>> settings on the file thread and have it post back to UI for storage.  On
the
>>> message filter side, it'll come down to getting that value either from a
>>> getter
>>> broker on the BrowserContext (or are prefs fair game on the UI thread?).
>>
>> I'm not sure I totally follow what you want to do with prefs. Are you
>> thinking of reading the file into a pref and storing it there?
>
> I was thinking of skipping file creation (which Chrome does now) and
> just poke it into prefs instead of writing out the file.

That certainly works from an architectural standpoint. I don't know
what the initial profile creation code looks like though.

Brett

Powered by Google App Engine
This is Rietveld 408576698