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

Issue 338353007: Implementation of shared worker code path for WebView file system permission. (Closed)

Created:
6 years, 6 months ago by Xi Han
Modified:
6 years, 5 months ago
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, darin-cc_chromium.org, jam, android-webview-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master_sharedworker
Project:
chromium
Visibility:
Public.

Description

Implementation of shared worker code path when WebView guest creates a shared worker to request file system access. BUG=343382 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=282272

Patch Set 1 : Initial patch #

Total comments: 5

Patch Set 2 : rebase #

Total comments: 11

Patch Set 3 : Rename + changes are made. #

Total comments: 3

Patch Set 4 : Use scoped_refptr. #

Total comments: 10

Patch Set 5 : Revert nameing changes. #

Total comments: 2

Patch Set 6 : Small changes according to atwilson's comments. #

Patch Set 7 : Fix a callback bug. #

Total comments: 12

Patch Set 8 : Update thread hops. #

Total comments: 2

Patch Set 9 : Update the guest permission request loop of Shared Worker. #

Patch Set 10 : Small changes are made. #

Total comments: 1

Patch Set 11 : Small changes are made. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+511 lines, -157 lines) Patch
M android_webview/browser/aw_content_browser_client.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -2 lines 0 comments Download
M android_webview/browser/aw_content_browser_client.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -3 lines 0 comments Download
M chrome/browser/apps/web_view_browsertest.cc View 1 2 3 4 5 6 1 chunk +62 lines, -0 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.h View 1 2 3 4 5 6 7 8 3 chunks +26 lines, -2 lines 0 comments Download
M chrome/browser/chrome_content_browser_client.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +80 lines, -6 lines 0 comments Download
M chrome/browser/guest_view/web_view/web_view_guest.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/chrome_render_message_filter.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +20 lines, -7 lines 0 comments Download
M chrome/browser/renderer_host/chrome_render_message_filter.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +70 lines, -48 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/filesystem/shared_worker/multiple/embedder.html View 1 2 3 4 5 6 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/filesystem/shared_worker/multiple/embedder.js View 1 2 3 4 5 6 7 chunks +47 lines, -34 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/filesystem/shared_worker/multiple/guest_shared_worker.html View 1 2 3 4 5 6 4 chunks +11 lines, -8 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/filesystem/shared_worker/multiple/manifest.json View 1 2 3 4 5 6 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/test/data/extensions/platform_apps/web_view/filesystem/shared_worker/multiple/shared_worker.js View 1 2 3 4 5 6 1 chunk +43 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/filesystem/shared_worker/multiple/test.js View 1 2 3 4 5 6 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/filesystem/shared_worker/single/embedder.html View 1 2 3 4 5 6 0 chunks +-1 lines, --1 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/filesystem/shared_worker/single/embedder.js View 1 2 3 4 5 6 4 chunks +9 lines, -9 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/filesystem/shared_worker/single/guest_shared_worker.html View 1 2 3 4 5 6 4 chunks +11 lines, -8 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/filesystem/shared_worker/single/manifest.json View 1 2 3 4 5 6 0 chunks +-1 lines, --1 lines 0 comments Download
A chrome/test/data/extensions/platform_apps/web_view/filesystem/shared_worker/single/shared_worker.js View 1 2 3 4 5 6 1 chunk +43 lines, -0 lines 0 comments Download
A + chrome/test/data/extensions/platform_apps/web_view/filesystem/shared_worker/single/test.js View 1 2 3 4 5 6 0 chunks +-1 lines, --1 lines 0 comments Download
M content/browser/shared_worker/shared_worker_host.h View 1 2 3 4 5 3 chunks +5 lines, -2 lines 0 comments Download
M content/browser/shared_worker/shared_worker_host.cc View 1 2 3 4 5 6 2 chunks +18 lines, -3 lines 0 comments Download
M content/browser/shared_worker/shared_worker_message_filter.h View 1 2 1 chunk +3 lines, -3 lines 0 comments Download
M content/browser/shared_worker/shared_worker_message_filter.cc View 1 2 3 4 2 chunks +7 lines, -8 lines 0 comments Download
M content/browser/shared_worker/shared_worker_service_impl.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M content/browser/shared_worker/shared_worker_service_impl.cc View 1 2 3 4 5 6 7 1 chunk +7 lines, -3 lines 0 comments Download
M content/browser/worker_host/worker_process_host.h View 1 2 3 4 5 6 7 3 chunks +8 lines, -3 lines 0 comments Download
M content/browser/worker_host/worker_process_host.cc View 1 2 3 4 5 6 7 3 chunks +24 lines, -8 lines 0 comments Download
M content/public/browser/content_browser_client.h View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -2 lines 0 comments Download
M content/public/browser/content_browser_client.cc View 1 2 3 4 1 chunk +4 lines, -3 lines 0 comments Download

Messages

Total messages: 38 (0 generated)
Xi Han
6 years, 6 months ago (2014-06-17 20:40:59 UTC) #1
Fady Samuel
lgtm
6 years, 6 months ago (2014-06-19 14:50:47 UTC) #2
Xi Han
Drew: Could you please review: - content/browser/shared_worker/shared_worker_host.cc - content/browser/shared_worker/shared_worker_host.h - content/browser/shared_worker/shared_worker_message_filter.cc - content/browser/shared_worker/shared_worker_message_filter.h - content/browser/shared_worker/shared_worker_service_impl.cc ...
6 years, 6 months ago (2014-06-19 15:42:44 UTC) #3
Xi Han
Bo: Could you please review: - android_webview/browser/aw_content_browser_client.cc - android_webview/browser/aw_content_browser_client.h Thanks a lot for your help!
6 years, 6 months ago (2014-06-19 15:43:46 UTC) #4
boliu
One name nit that's really a content level issue aw lgtm https://codereview.chromium.org/338353007/diff/20001/android_webview/browser/aw_content_browser_client.h File android_webview/browser/aw_content_browser_client.h (right): ...
6 years, 6 months ago (2014-06-19 15:57:35 UTC) #5
Xi Han
John: could you please review: - chrome/browser/apps/web_view_browsertest.cc - chrome/browser/chrome_content_browser_client.h - chrome/browser/chrome_content_browser_client.cc - chrome/browser/renderer_host/chrome_render_message_filter.cc - chrome/browser/renderer_host/chrome_render_message_filter.h ...
6 years, 6 months ago (2014-06-19 16:19:42 UTC) #6
Xi Han
https://codereview.chromium.org/338353007/diff/20001/android_webview/browser/aw_content_browser_client.h File android_webview/browser/aw_content_browser_client.h (right): https://codereview.chromium.org/338353007/diff/20001/android_webview/browser/aw_content_browser_client.h#newcode84 android_webview/browser/aw_content_browser_client.h:84: virtual void RequestFileSystemAccessSync( On 2014/06/19 15:57:35, boliu wrote: > ...
6 years, 6 months ago (2014-06-19 16:37:46 UTC) #7
jam
https://codereview.chromium.org/338353007/diff/20001/content/public/browser/content_browser_client.h File content/public/browser/content_browser_client.h (right): https://codereview.chromium.org/338353007/diff/20001/content/public/browser/content_browser_client.h#newcode348 content/public/browser/content_browser_client.h:348: virtual void RequestWorkerFileSystemAccessSync( I'm confused, this has a Sync ...
6 years, 6 months ago (2014-06-19 16:47:28 UTC) #8
Fady Samuel
https://codereview.chromium.org/338353007/diff/20001/content/public/browser/content_browser_client.h File content/public/browser/content_browser_client.h (right): https://codereview.chromium.org/338353007/diff/20001/content/public/browser/content_browser_client.h#newcode348 content/public/browser/content_browser_client.h:348: virtual void RequestWorkerFileSystemAccessSync( On 2014/06/19 16:47:27, jam wrote: > ...
6 years, 6 months ago (2014-06-19 16:50:11 UTC) #9
Fady Samuel
https://codereview.chromium.org/338353007/diff/20001/content/public/browser/content_browser_client.h File content/public/browser/content_browser_client.h (right): https://codereview.chromium.org/338353007/diff/20001/content/public/browser/content_browser_client.h#newcode348 content/public/browser/content_browser_client.h:348: virtual void RequestWorkerFileSystemAccessSync( On 2014/06/19 16:47:27, jam wrote: > ...
6 years, 6 months ago (2014-06-19 16:50:11 UTC) #10
Xi Han
https://codereview.chromium.org/338353007/diff/20001/content/public/browser/content_browser_client.h File content/public/browser/content_browser_client.h (right): https://codereview.chromium.org/338353007/diff/20001/content/public/browser/content_browser_client.h#newcode348 content/public/browser/content_browser_client.h:348: virtual void RequestWorkerFileSystemAccessSync( On 2014/06/19 16:50:11, Fady Samuel wrote: ...
6 years, 6 months ago (2014-06-19 17:22:27 UTC) #11
Xi Han
Andrew: Could you please review: - content/browser/shared_worker/shared_worker_host.cc - content/browser/shared_worker/shared_worker_host.h - content/browser/shared_worker/shared_worker_message_filter.cc - content/browser/shared_worker/shared_worker_message_filter.h - content/browser/shared_worker/shared_worker_service_impl.cc ...
6 years, 6 months ago (2014-06-19 20:55:09 UTC) #12
Andrew T Wilson (Slow)
I made a pass at this, but honestly jam@ is the expert on the content/ ...
6 years, 6 months ago (2014-06-20 22:04:27 UTC) #13
Andrew T Wilson (Slow)
> https://codereview.chromium.org/338353007/diff/40001/content/public/browser/content_browser_client.h#newcode348 > content/public/browser/content_browser_client.h:348: virtual void > RequestWorkerFileSystemAccessSync( > Why is this called ...AccessSync() - ...
6 years, 6 months ago (2014-06-20 22:05:32 UTC) #14
Xi Han
I answered the naming question, and I will take care of other comments ASAP tomorrow ...
6 years, 6 months ago (2014-06-23 02:51:13 UTC) #15
jam
https://codereview.chromium.org/338353007/diff/40001/content/browser/shared_worker/shared_worker_host.cc File content/browser/shared_worker/shared_worker_host.cc (right): https://codereview.chromium.org/338353007/diff/40001/content/browser/shared_worker/shared_worker_host.cc#newcode232 content/browser/shared_worker/shared_worker_host.cc:232: base::Unretained(this), On 2014/06/20 22:04:26, Andrew T Wilson wrote: > ...
6 years, 6 months ago (2014-06-23 07:02:00 UTC) #16
Xi Han
Changes are made according to all the comments. Also, I did a little bit code ...
6 years, 6 months ago (2014-06-23 20:43:35 UTC) #17
Fady Samuel
https://codereview.chromium.org/338353007/diff/130026/chrome/browser/renderer_host/chrome_render_message_filter.cc File chrome/browser/renderer_host/chrome_render_message_filter.cc (right): https://codereview.chromium.org/338353007/diff/130026/chrome/browser/renderer_host/chrome_render_message_filter.cc#newcode232 chrome/browser/renderer_host/chrome_render_message_filter.cc:232: base::Unretained(this), This should probably be a scoped_ref_ptr. I think ...
6 years, 6 months ago (2014-06-24 18:30:43 UTC) #18
Xi Han
https://codereview.chromium.org/338353007/diff/130026/chrome/browser/renderer_host/chrome_render_message_filter.cc File chrome/browser/renderer_host/chrome_render_message_filter.cc (right): https://codereview.chromium.org/338353007/diff/130026/chrome/browser/renderer_host/chrome_render_message_filter.cc#newcode232 chrome/browser/renderer_host/chrome_render_message_filter.cc:232: base::Unretained(this), On 2014/06/24 18:30:43, Fady Samuel wrote: > This ...
6 years, 6 months ago (2014-06-24 20:44:23 UTC) #19
jabdelmalek
lgtm with comments https://codereview.chromium.org/338353007/diff/150001/content/browser/shared_worker/shared_worker_host.h File content/browser/shared_worker/shared_worker_host.h (right): https://codereview.chromium.org/338353007/diff/150001/content/browser/shared_worker/shared_worker_host.h#newcode68 content/browser/shared_worker/shared_worker_host.h:68: void RequestFileSystemAccess(const GURL& url, IPC::Message* reply_msg); ...
6 years, 6 months ago (2014-06-24 21:23:32 UTC) #20
Xi Han
https://codereview.chromium.org/338353007/diff/150001/content/browser/shared_worker/shared_worker_host.h File content/browser/shared_worker/shared_worker_host.h (right): https://codereview.chromium.org/338353007/diff/150001/content/browser/shared_worker/shared_worker_host.h#newcode68 content/browser/shared_worker/shared_worker_host.h:68: void RequestFileSystemAccess(const GURL& url, IPC::Message* reply_msg); On 2014/06/24 21:23:31, ...
6 years, 6 months ago (2014-06-25 14:50:26 UTC) #21
jam
slgtm
6 years, 6 months ago (2014-06-25 21:51:29 UTC) #22
Andrew T Wilson (Slow)
lgtm with one suggestion https://codereview.chromium.org/338353007/diff/170001/content/browser/shared_worker/shared_worker_host.cc File content/browser/shared_worker/shared_worker_host.cc (right): https://codereview.chromium.org/338353007/diff/170001/content/browser/shared_worker/shared_worker_host.cc#newcode226 content/browser/shared_worker/shared_worker_host.cc:226: if (!instance_) Does reply_msg leak ...
6 years, 6 months ago (2014-06-26 15:49:33 UTC) #23
Xi Han
https://codereview.chromium.org/338353007/diff/170001/content/browser/shared_worker/shared_worker_host.cc File content/browser/shared_worker/shared_worker_host.cc (right): https://codereview.chromium.org/338353007/diff/170001/content/browser/shared_worker/shared_worker_host.cc#newcode226 content/browser/shared_worker/shared_worker_host.cc:226: if (!instance_) On 2014/06/26 15:49:33, Andrew T Wilson wrote: ...
6 years, 6 months ago (2014-06-26 18:57:53 UTC) #24
Xi Han
This CL is updated due to a test failure in chromeos, which is caused by ...
6 years, 5 months ago (2014-07-03 14:33:00 UTC) #25
Xi Han
https://codereview.chromium.org/338353007/diff/250001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/338353007/diff/250001/chrome/browser/chrome_content_browser_client.cc#newcode1835 chrome/browser/chrome_content_browser_client.cc:1835: for (i = render_frames.begin(); i != render_frames.end(); ++i) { ...
6 years, 5 months ago (2014-07-03 15:02:51 UTC) #26
Fady Samuel
https://codereview.chromium.org/338353007/diff/250001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/338353007/diff/250001/chrome/browser/chrome_content_browser_client.cc#newcode1842 chrome/browser/chrome_content_browser_client.cc:1842: base::Bind(&WebViewGuest::RequestFileSystemAccessPermission, RequestFileSystemPermissionFromIOThread https://codereview.chromium.org/338353007/diff/250001/chrome/browser/guest_view/web_view/web_view_guest.cc File chrome/browser/guest_view/web_view/web_view_guest.cc (right): https://codereview.chromium.org/338353007/diff/250001/chrome/browser/guest_view/web_view/web_view_guest.cc#newcode965 chrome/browser/guest_view/web_view/web_view_guest.cc:965: callback.Run(allowed); ...
6 years, 5 months ago (2014-07-08 14:42:46 UTC) #27
Xi Han
https://codereview.chromium.org/338353007/diff/250001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/338353007/diff/250001/chrome/browser/chrome_content_browser_client.cc#newcode1842 chrome/browser/chrome_content_browser_client.cc:1842: base::Bind(&WebViewGuest::RequestFileSystemAccessPermission, On 2014/07/08 14:42:46, Fady Samuel wrote: > RequestFileSystemPermissionFromIOThread ...
6 years, 5 months ago (2014-07-08 21:28:24 UTC) #28
Fady Samuel
https://codereview.chromium.org/338353007/diff/290001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/338353007/diff/290001/chrome/browser/chrome_content_browser_client.cc#newcode1836 chrome/browser/chrome_content_browser_client.cc:1836: WebViewRendererState::GetInstance()->IsGuest(i->first); This code doesn't make sense to me. If ...
6 years, 5 months ago (2014-07-08 21:49:11 UTC) #29
Fady Samuel
https://codereview.chromium.org/338353007/diff/290001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/338353007/diff/290001/chrome/browser/chrome_content_browser_client.cc#newcode1836 chrome/browser/chrome_content_browser_client.cc:1836: WebViewRendererState::GetInstance()->IsGuest(i->first); This code doesn't make sense to me. If ...
6 years, 5 months ago (2014-07-08 21:49:11 UTC) #30
Fady Samuel
6 years, 5 months ago (2014-07-08 21:49:14 UTC) #31
Xi Han
https://codereview.chromium.org/338353007/diff/290001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/338353007/diff/290001/chrome/browser/chrome_content_browser_client.cc#newcode1836 chrome/browser/chrome_content_browser_client.cc:1836: WebViewRendererState::GetInstance()->IsGuest(i->first); On 2014/07/08 21:49:11, Fady Samuel wrote: > This ...
6 years, 5 months ago (2014-07-09 15:28:33 UTC) #32
Xi Han
6 years, 5 months ago (2014-07-09 15:52:45 UTC) #33
Fady Samuel
lgtm with nit https://codereview.chromium.org/338353007/diff/370001/chrome/browser/chrome_content_browser_client.cc File chrome/browser/chrome_content_browser_client.cc (right): https://codereview.chromium.org/338353007/diff/370001/chrome/browser/chrome_content_browser_client.cc#newcode1858 chrome/browser/chrome_content_browser_client.cc:1858: if (WebViewRendererState::GetInstance()->IsGuest(i->first)) { Remove block.
6 years, 5 months ago (2014-07-09 21:08:33 UTC) #34
Xi Han
The CQ bit was checked by hanxi@chromium.org
6 years, 5 months ago (2014-07-09 21:27:28 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hanxi@chromium.org/338353007/390001
6 years, 5 months ago (2014-07-09 21:28:30 UTC) #36
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_rel on tryserver.chromium ...
6 years, 5 months ago (2014-07-10 02:49:16 UTC) #37
commit-bot: I haz the power
6 years, 5 months ago (2014-07-10 07:45:53 UTC) #38
Message was sent while issue was closed.
Change committed as 282272

Powered by Google App Engine
This is Rietveld 408576698