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

Issue 739033003: Support content scheme uri for Chrome on Android (Closed)

Created:
6 years, 1 month ago by qinmin
Modified:
6 years ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, erikwright+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Support content scheme uri for Chrome on Android Android uses content scheme to store files and ensure permission checks. For example, the downloaded files are stored as content://downloads/all_downloads/123. However, chrome currently cannot handle url requests for content uri. As a result, chrome can save html pages to sdcard, but cannot open it. This change adds the content scheme support for chrome on android. BUG=433011 Committed: https://crrev.com/120a15519703dfe8601596f1f436a322ea0a2aff Cr-Commit-Position: refs/heads/master@{#305772}

Patch Set 1 #

Total comments: 23

Patch Set 2 : addressing comments #

Total comments: 15

Patch Set 3 : nits #

Total comments: 1

Patch Set 4 : moving content:// protocol handler to content/browser/android #

Total comments: 27

Patch Set 5 : addressing siever's comments #

Total comments: 2

Patch Set 6 : nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+763 lines, -18 lines) Patch
M base/BUILD.gn View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M base/android/content_uri_utils.h View 1 1 chunk +7 lines, -3 lines 0 comments Download
M base/android/content_uri_utils.cc View 1 chunk +10 lines, -0 lines 0 comments Download
A base/android/content_uri_utils_unittest.cc View 1 chunk +37 lines, -0 lines 0 comments Download
M base/android/java/src/org/chromium/base/ContentUriUtils.java View 1 2 3 6 chunks +29 lines, -13 lines 0 comments Download
M base/base.gyp View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 1 2 3 4 5 2 chunks +9 lines, -0 lines 0 comments Download
A content/browser/android/content_protocol_handler_impl.h View 1 2 3 4 1 chunk +45 lines, -0 lines 0 comments Download
A content/browser/android/content_protocol_handler_impl.cc View 1 2 3 1 chunk +43 lines, -0 lines 0 comments Download
A content/browser/android/url_request_content_job.h View 1 2 3 4 1 chunk +103 lines, -0 lines 0 comments Download
A content/browser/android/url_request_content_job.cc View 1 2 3 4 5 1 chunk +228 lines, -0 lines 0 comments Download
A content/browser/android/url_request_content_job_unittest.cc View 1 2 3 4 1 chunk +198 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 3 chunks +7 lines, -2 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
A content/public/browser/android/content_protocol_handler.h View 1 2 3 4 1 chunk +32 lines, -0 lines 0 comments Download
A + content/test/data/android/red.png View 1 2 3 Binary file 0 comments Download
M content/test/run_all_unittests.cc View 1 2 3 1 chunk +9 lines, -0 lines 0 comments Download
M url/url_constants.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M url/url_constants.cc View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 40 (9 generated)
qinmin
PTAL thakis for base/ and chrome/ OWNER asanka for net/ OWNER nyquist for base/android OWNER
6 years, 1 month ago (2014-11-18 23:53:58 UTC) #2
qinmin
6 years, 1 month ago (2014-11-18 23:54:34 UTC) #4
Nico
It looks wrong to me that base knows about content:// stuff. Shouldn't the content uri ...
6 years, 1 month ago (2014-11-18 23:56:35 UTC) #5
Nico
On 2014/11/18 23:56:35, Nico wrote: > It looks wrong to me that base knows about ...
6 years, 1 month ago (2014-11-19 00:01:50 UTC) #6
nyquist
content:// in Android sadly is not the same as //content in Chrome (even though //chrome ...
6 years, 1 month ago (2014-11-19 00:02:30 UTC) #7
Nico
base/ lgtm (with the gn change nyquist asked for) +noms for the chrome/browser/profiles change. https://codereview.chromium.org/739033003/diff/1/url/url_constants.h ...
6 years, 1 month ago (2014-11-19 00:06:03 UTC) #9
nyquist
https://codereview.chromium.org/739033003/diff/1/base/android/java/src/org/chromium/base/ContentUriUtils.java File base/android/java/src/org/chromium/base/ContentUriUtils.java (right): https://codereview.chromium.org/739033003/diff/1/base/android/java/src/org/chromium/base/ContentUriUtils.java#newcode85 base/android/java/src/org/chromium/base/ContentUriUtils.java:85: * Retrieve the mime type for the content URI. ...
6 years, 1 month ago (2014-11-19 00:06:25 UTC) #10
palmer
https://codereview.chromium.org/739033003/diff/1/base/android/content_uri_utils.cc File base/android/content_uri_utils.cc (right): https://codereview.chromium.org/739033003/diff/1/base/android/content_uri_utils.cc#newcode38 base/android/content_uri_utils.cc:38: std::string GetContentUriMimeType(const FilePath& content_uri) { The name "...uri" seems ...
6 years, 1 month ago (2014-11-19 00:23:54 UTC) #11
qinmin
https://codereview.chromium.org/739033003/diff/1/base/android/content_uri_utils.cc File base/android/content_uri_utils.cc (right): https://codereview.chromium.org/739033003/diff/1/base/android/content_uri_utils.cc#newcode38 base/android/content_uri_utils.cc:38: std::string GetContentUriMimeType(const FilePath& content_uri) { On 2014/11/19 00:23:54, Chromium ...
6 years, 1 month ago (2014-11-19 02:13:08 UTC) #12
qinmin
+brettw for url/ OWNER @nyquist, @asanka, @palmer, would you please take another look?
6 years, 1 month ago (2014-11-20 17:42:02 UTC) #14
brettw
url lgtm
6 years, 1 month ago (2014-11-20 18:50:37 UTC) #15
palmer
LGTM
6 years, 1 month ago (2014-11-20 19:04:47 UTC) #16
nyquist
https://codereview.chromium.org/739033003/diff/20001/base/android/java/src/org/chromium/base/ContentUriUtils.java File base/android/java/src/org/chromium/base/ContentUriUtils.java (right): https://codereview.chromium.org/739033003/diff/20001/base/android/java/src/org/chromium/base/ContentUriUtils.java#newcode33 base/android/java/src/org/chromium/base/ContentUriUtils.java:33: public Uri getContentUriFromFile(Context context, File file); This is implicitly ...
6 years, 1 month ago (2014-11-20 20:01:11 UTC) #17
qinmin
https://codereview.chromium.org/739033003/diff/20001/base/android/java/src/org/chromium/base/ContentUriUtils.java File base/android/java/src/org/chromium/base/ContentUriUtils.java (right): https://codereview.chromium.org/739033003/diff/20001/base/android/java/src/org/chromium/base/ContentUriUtils.java#newcode33 base/android/java/src/org/chromium/base/ContentUriUtils.java:33: public Uri getContentUriFromFile(Context context, File file); On 2014/11/20 20:01:11, ...
6 years, 1 month ago (2014-11-20 23:07:19 UTC) #18
nyquist
thanks! lgtm
6 years, 1 month ago (2014-11-20 23:15:48 UTC) #19
noms (inactive)
mmenke@ is a better reviewer for ProfileIOData. Sorry!
6 years, 1 month ago (2014-11-21 00:38:08 UTC) #21
asanka
mmenke: I see you are on the hook as well. Mind looking at the //net ...
6 years, 1 month ago (2014-11-21 02:22:02 UTC) #22
mmenke
asanka: Don't think this requires any //net changes. Android WebView already has support for content ...
6 years, 1 month ago (2014-11-21 15:37:14 UTC) #23
qinmin
On 2014/11/21 15:37:14, mmenke wrote: > asanka: Don't think this requires any //net changes. > ...
6 years, 1 month ago (2014-11-21 16:27:42 UTC) #24
mmenke
On 2014/11/21 16:27:42, qinmin wrote: > On 2014/11/21 15:37:14, mmenke wrote: > > asanka: Don't ...
6 years, 1 month ago (2014-11-21 16:37:30 UTC) #25
qinmin
+sievers for all the content/ review -mmenke, -noms
6 years ago (2014-11-25 19:45:50 UTC) #27
no sievers
https://codereview.chromium.org/739033003/diff/60001/content/browser/android/content_protocol_handler_impl.h File content/browser/android/content_protocol_handler_impl.h (right): https://codereview.chromium.org/739033003/diff/60001/content/browser/android/content_protocol_handler_impl.h#newcode11 content/browser/android/content_protocol_handler_impl.h:11: #include "content/public/browser/android/content_protocol_handler.h" Is this file missing in the patch? ...
6 years ago (2014-11-25 20:50:19 UTC) #28
qinmin
https://codereview.chromium.org/739033003/diff/60001/content/browser/android/content_protocol_handler_impl.h File content/browser/android/content_protocol_handler_impl.h (right): https://codereview.chromium.org/739033003/diff/60001/content/browser/android/content_protocol_handler_impl.h#newcode11 content/browser/android/content_protocol_handler_impl.h:11: #include "content/public/browser/android/content_protocol_handler.h" On 2014/11/25 20:50:18, sievers wrote: > Is ...
6 years ago (2014-11-25 23:37:02 UTC) #30
no sievers
https://codereview.chromium.org/739033003/diff/60001/content/browser/android/url_request_content_job.cc File content/browser/android/url_request_content_job.cc (right): https://codereview.chromium.org/739033003/diff/60001/content/browser/android/url_request_content_job.cc#newcode216 content/browser/android/url_request_content_job.cc:216: if (result == 0) { On 2014/11/25 23:37:02, qinmin ...
6 years ago (2014-11-25 23:51:52 UTC) #31
qinmin
https://codereview.chromium.org/739033003/diff/60001/content/browser/android/url_request_content_job.cc File content/browser/android/url_request_content_job.cc (right): https://codereview.chromium.org/739033003/diff/60001/content/browser/android/url_request_content_job.cc#newcode216 content/browser/android/url_request_content_job.cc:216: if (result == 0) { On 2014/11/25 23:51:52, sievers ...
6 years ago (2014-11-26 00:56:47 UTC) #32
no sievers
https://codereview.chromium.org/739033003/diff/60001/content/browser/android/url_request_content_job.cc File content/browser/android/url_request_content_job.cc (right): https://codereview.chromium.org/739033003/diff/60001/content/browser/android/url_request_content_job.cc#newcode216 content/browser/android/url_request_content_job.cc:216: if (result == 0) { On 2014/11/26 00:56:46, qinmin ...
6 years ago (2014-11-26 01:09:49 UTC) #33
qinmin
https://codereview.chromium.org/739033003/diff/60001/content/browser/android/url_request_content_job.cc File content/browser/android/url_request_content_job.cc (right): https://codereview.chromium.org/739033003/diff/60001/content/browser/android/url_request_content_job.cc#newcode216 content/browser/android/url_request_content_job.cc:216: if (result == 0) { On 2014/11/26 01:09:49, sievers ...
6 years ago (2014-11-26 01:38:42 UTC) #35
no sievers
lgtm https://codereview.chromium.org/739033003/diff/60001/content/browser/android/url_request_content_job.cc File content/browser/android/url_request_content_job.cc (right): https://codereview.chromium.org/739033003/diff/60001/content/browser/android/url_request_content_job.cc#newcode216 content/browser/android/url_request_content_job.cc:216: if (result == 0) { On 2014/11/26 01:38:42, ...
6 years ago (2014-11-26 01:46:08 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/739033003/130001
6 years ago (2014-11-26 01:51:59 UTC) #38
commit-bot: I haz the power
Committed patchset #6 (id:130001)
6 years ago (2014-11-26 03:02:24 UTC) #39
commit-bot: I haz the power
6 years ago (2014-11-26 03:03:47 UTC) #40
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/120a15519703dfe8601596f1f436a322ea0a2aff
Cr-Commit-Position: refs/heads/master@{#305772}

Powered by Google App Engine
This is Rietveld 408576698