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

Issue 10213002: Make downloads.download() respect host permissions (Closed)

Created:
8 years, 8 months ago by benjhayden
Modified:
8 years, 7 months ago
CC:
chromium-reviews, mihaip-chromium-reviews_chromium.org, rdsmith+dwatch_chromium.org, Eric U.
Visibility:
Public.

Description

Make downloads.download() respect host permissions This behavior is already documented: http://code.google.com/chrome/extensions/trunk/experimental.downloads.html Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=137245

Patch Set 1 #

Patch Set 2 : " #

Patch Set 3 : " #

Total comments: 4

Patch Set 4 : " #

Total comments: 2

Patch Set 5 : merge #

Patch Set 6 : style #

Total comments: 4

Patch Set 7 : debugging #

Patch Set 8 : aha #

Patch Set 9 : -data #

Patch Set 10 : style #

Patch Set 11 : " #

Total comments: 3

Patch Set 12 : " #

Patch Set 13 : " #

Patch Set 14 : merge #

Total comments: 4

Patch Set 15 : merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+89 lines, -15 lines) Patch
M chrome/browser/download/download_extension_api.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/test/data/extensions/api_test/downloads/manifest.json View 1 2 3 4 5 6 7 8 9 10 1 chunk +7 lines, -1 line 0 comments Download
M chrome/test/data/extensions/api_test/downloads/test.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +75 lines, -14 lines 0 comments Download

Messages

Total messages: 33 (0 generated)
benjhayden
8 years, 8 months ago (2012-04-27 14:41:42 UTC) #1
Randy Smith (Not in Mondays)
LGTM, but you should probably run this by an extensions person.
8 years, 8 months ago (2012-04-27 18:55:09 UTC) #2
benjhayden
Mihai, would you mind checking my use of HasHostPermission()?
8 years, 7 months ago (2012-04-28 17:49:24 UTC) #3
Mihai Parparita -not on Chrome
http://codereview.chromium.org/10213002/diff/12002/chrome/browser/download/download_extension_api.cc File chrome/browser/download/download_extension_api.cc (right): http://codereview.chromium.org/10213002/diff/12002/chrome/browser/download/download_extension_api.cc#newcode386 chrome/browser/download/download_extension_api.cc:386: if ((iodata_->url.SchemeIs("http") || Why do you have these scheme ...
8 years, 7 months ago (2012-05-01 20:08:31 UTC) #4
benjhayden
http://codereview.chromium.org/10213002/diff/12002/chrome/browser/download/download_extension_api.cc File chrome/browser/download/download_extension_api.cc (right): http://codereview.chromium.org/10213002/diff/12002/chrome/browser/download/download_extension_api.cc#newcode386 chrome/browser/download/download_extension_api.cc:386: if ((iodata_->url.SchemeIs("http") || On 2012/05/01 20:08:31, Mihai Parparita wrote: ...
8 years, 7 months ago (2012-05-01 20:19:11 UTC) #5
Mihai Parparita -not on Chrome
http://codereview.chromium.org/10213002/diff/12002/chrome/browser/download/download_extension_api.cc File chrome/browser/download/download_extension_api.cc (right): http://codereview.chromium.org/10213002/diff/12002/chrome/browser/download/download_extension_api.cc#newcode386 chrome/browser/download/download_extension_api.cc:386: if ((iodata_->url.SchemeIs("http") || On 2012/05/01 20:19:12, benjhayden_chromium wrote: > ...
8 years, 7 months ago (2012-05-01 20:53:11 UTC) #6
benjhayden
PTAL http://codereview.chromium.org/10213002/diff/12002/chrome/browser/download/download_extension_api.cc File chrome/browser/download/download_extension_api.cc (right): http://codereview.chromium.org/10213002/diff/12002/chrome/browser/download/download_extension_api.cc#newcode386 chrome/browser/download/download_extension_api.cc:386: if ((iodata_->url.SchemeIs("http") || On 2012/05/01 20:53:12, Mihai Parparita ...
8 years, 7 months ago (2012-05-02 14:40:18 UTC) #7
Mihai Parparita -not on Chrome
LGTM
8 years, 7 months ago (2012-05-02 22:28:58 UTC) #8
Aaron Boodman
http://codereview.chromium.org/10213002/diff/20002/chrome/browser/download/download_extension_api.cc File chrome/browser/download/download_extension_api.cc (right): http://codereview.chromium.org/10213002/diff/20002/chrome/browser/download/download_extension_api.cc#newcode385 chrome/browser/download/download_extension_api.cc:385: !iodata_->url.SchemeIs("filesystem") && Isn't this a way to circumvent host ...
8 years, 7 months ago (2012-05-02 22:52:07 UTC) #9
Aaron Boodman
On 2012/05/02 22:52:07, Aaron Boodman wrote: > http://codereview.chromium.org/10213002/diff/20002/chrome/browser/download/download_extension_api.cc > File chrome/browser/download/download_extension_api.cc (right): > > http://codereview.chromium.org/10213002/diff/20002/chrome/browser/download/download_extension_api.cc#newcode385 ...
8 years, 7 months ago (2012-05-02 22:52:35 UTC) #10
Aaron Boodman
+ericu fyi
8 years, 7 months ago (2012-05-02 22:55:04 UTC) #11
ericu
http://codereview.chromium.org/10213002/diff/20002/chrome/browser/download/download_extension_api.cc File chrome/browser/download/download_extension_api.cc (right): http://codereview.chromium.org/10213002/diff/20002/chrome/browser/download/download_extension_api.cc#newcode385 chrome/browser/download/download_extension_api.cc:385: !iodata_->url.SchemeIs("filesystem") && On 2012/05/02 22:52:07, Aaron Boodman wrote: > ...
8 years, 7 months ago (2012-05-02 23:26:32 UTC) #12
benjhayden
Looks like 10224011 landed. I merged, wrote a test for the filesystem: case, removed the ...
8 years, 7 months ago (2012-05-03 16:47:36 UTC) #13
ericu
On 2012/05/03 16:47:36, benjhayden_chromium wrote: > Looks like 10224011 landed. I merged, wrote a test ...
8 years, 7 months ago (2012-05-03 17:14:47 UTC) #14
ericu
http://codereview.chromium.org/10213002/diff/33002/chrome/test/data/extensions/api_test/downloads/manifest.json File chrome/test/data/extensions/api_test/downloads/manifest.json (right): http://codereview.chromium.org/10213002/diff/33002/chrome/test/data/extensions/api_test/downloads/manifest.json#newcode15 chrome/test/data/extensions/api_test/downloads/manifest.json:15: "filesystem:*", I don't think you should need either mention ...
8 years, 7 months ago (2012-05-03 17:14:55 UTC) #15
benjhayden
The URL is filesystem:chrome-extension://fkkgfmjnokdaipgddojcidaofhhadnki/temporary/0.07071475544944406/0.txt I added log statements to both gurl.cc and url_pattern.cc. The inner ...
8 years, 7 months ago (2012-05-03 19:38:34 UTC) #16
ericu
On 2012/05/03 19:38:34, benjhayden_chromium wrote: > The URL is > filesystem:chrome-extension://fkkgfmjnokdaipgddojcidaofhhadnki/temporary/0.07071475544944406/0.txt > I added log ...
8 years, 7 months ago (2012-05-04 15:12:17 UTC) #17
benjhayden
On 2012/05/04 15:12:17, ericu wrote: > On 2012/05/03 19:38:34, benjhayden_chromium wrote: > > The URL ...
8 years, 7 months ago (2012-05-04 18:05:03 UTC) #18
benjhayden
On 2012/05/04 18:05:03, benjhayden_chromium wrote: > On 2012/05/04 15:12:17, ericu wrote: > > On 2012/05/03 ...
8 years, 7 months ago (2012-05-04 18:08:37 UTC) #19
ericu
On Fri, May 4, 2012 at 11:08 AM, <benjhayden@chromium.org> wrote: > On 2012/05/04 18:05:03, benjhayden_chromium ...
8 years, 7 months ago (2012-05-04 18:38:44 UTC) #20
benjhayden
Eric, Mihai, Aaron, PTAL. This is working on my machine, but we'll see what the ...
8 years, 7 months ago (2012-05-08 22:36:30 UTC) #21
Aaron Boodman
http://codereview.chromium.org/10213002/diff/49002/chrome/common/extensions/extension.cc File chrome/common/extensions/extension.cc (right): http://codereview.chromium.org/10213002/diff/49002/chrome/common/extensions/extension.cc#newcode3234 chrome/common/extensions/extension.cc:3234: if (url.SchemeIs(chrome::kExtensionScheme) && I think you can replace this ...
8 years, 7 months ago (2012-05-09 05:32:38 UTC) #22
ericu
I've got nothing to add to what Aaron said; I'll let him take it from ...
8 years, 7 months ago (2012-05-09 18:25:11 UTC) #23
Aaron Boodman
http://codereview.chromium.org/10213002/diff/49002/chrome/common/extensions/extension.cc File chrome/common/extensions/extension.cc (right): http://codereview.chromium.org/10213002/diff/49002/chrome/common/extensions/extension.cc#newcode3234 chrome/common/extensions/extension.cc:3234: if (url.SchemeIs(chrome::kExtensionScheme) && On 2012/05/09 05:32:38, Aaron Boodman wrote: ...
8 years, 7 months ago (2012-05-09 18:28:44 UTC) #24
benjhayden
http://codereview.chromium.org/10213002/diff/49002/chrome/common/extensions/extension.cc File chrome/common/extensions/extension.cc (right): http://codereview.chromium.org/10213002/diff/49002/chrome/common/extensions/extension.cc#newcode3234 chrome/common/extensions/extension.cc:3234: if (url.SchemeIs(chrome::kExtensionScheme) && On 2012/05/09 18:28:44, Aaron Boodman wrote: ...
8 years, 7 months ago (2012-05-09 21:36:42 UTC) #25
benjhayden
http://codereview.chromium.org/10213002/diff/49002/chrome/common/extensions/extension.cc File chrome/common/extensions/extension.cc (right): http://codereview.chromium.org/10213002/diff/49002/chrome/common/extensions/extension.cc#newcode3234 chrome/common/extensions/extension.cc:3234: if (url.SchemeIs(chrome::kExtensionScheme) && On 2012/05/09 18:28:44, Aaron Boodman wrote: ...
8 years, 7 months ago (2012-05-09 21:36:42 UTC) #26
Aaron Boodman
On 2012/05/09 21:36:42, benjhayden_chromium wrote: > http://codereview.chromium.org/10213002/diff/49002/chrome/common/extensions/extension.cc > File chrome/common/extensions/extension.cc (right): > > http://codereview.chromium.org/10213002/diff/49002/chrome/common/extensions/extension.cc#newcode3234 > ...
8 years, 7 months ago (2012-05-11 21:10:06 UTC) #27
benjhayden
merge
8 years, 7 months ago (2012-05-14 15:43:33 UTC) #28
benjhayden
PTAL
8 years, 7 months ago (2012-05-14 15:45:28 UTC) #29
Aaron Boodman
lgtm https://chromiumcodereview.appspot.com/10213002/diff/43010/chrome/browser/download/download_extension_api.cc File chrome/browser/download/download_extension_api.cc (right): https://chromiumcodereview.appspot.com/10213002/diff/43010/chrome/browser/download/download_extension_api.cc#newcode372 chrome/browser/download/download_extension_api.cc:372: base::DictionaryValue* options = NULL; For future CL: You ...
8 years, 7 months ago (2012-05-14 21:32:13 UTC) #30
benjhayden
Thanks, Aaron! I'll merge and commit this afternoon if there are no objections. http://codereview.chromium.org/10213002/diff/43010/chrome/browser/download/download_extension_api.cc File ...
8 years, 7 months ago (2012-05-15 17:47:01 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/benjhayden@chromium.org/10213002/47007
8 years, 7 months ago (2012-05-15 19:17:42 UTC) #32
commit-bot: I haz the power
8 years, 7 months ago (2012-05-15 21:18:26 UTC) #33
Change committed as 137245

Powered by Google App Engine
This is Rietveld 408576698