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

Issue 6324020: Tweak the auto-open algorithm to permit JNLP to auto-open iff the user has... (Closed)

Created:
9 years, 11 months ago by Chris Evans
Modified:
9 years, 6 months ago
CC:
chromium-reviews, rdsmith+dwatch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Tweak the auto-open algorithm to permit JNLP to auto-open iff the user has set auto-open on JNLP, and the JNLP file arrives courtesy of a user click. BUG=10877 TEST=http://phet.colorado.edu/simulations/sims.php?sim=John_Travoltage Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=73080

Patch Set 1 #

Total comments: 2

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -8 lines) Patch
M chrome/browser/download/download_manager.cc View 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/download/download_util.h View 1 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/browser/download/download_util.cc View 1 1 chunk +6 lines, -5 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Chris Evans
9 years, 11 months ago (2011-01-28 23:19:49 UTC) #1
Randy Smith (Not in Mondays)
On 2011/01/28 23:19:49, Chris Evans wrote: Chris: You didn't specify a reviewer, but LGTM. I've ...
9 years, 11 months ago (2011-01-28 23:44:46 UTC) #2
Peter Kasting
LGTM http://codereview.chromium.org/6324020/diff/1/chrome/browser/download/download_util.cc File chrome/browser/download/download_util.cc (right): http://codereview.chromium.org/6324020/diff/1/chrome/browser/download/download_util.cc#newcode770 chrome/browser/download/download_util.cc:770: if (auto_open && info->has_user_gesture) { Two nits: * ...
9 years, 11 months ago (2011-01-28 23:51:25 UTC) #3
Chris Evans
9 years, 11 months ago (2011-01-29 03:12:01 UTC) #4
On 2011/01/28 23:51:25, Peter Kasting wrote:
> LGTM
> 
>
http://codereview.chromium.org/6324020/diff/1/chrome/browser/download/downloa...
> File chrome/browser/download/download_util.cc (right):
> 
>
http://codereview.chromium.org/6324020/diff/1/chrome/browser/download/downloa...
> chrome/browser/download/download_util.cc:770: if (auto_open &&
> info->has_user_gesture) {
> Two nits:
> 
> * Can condense this whole block to "return !auto_open ||
> !info->has_user_gesture"

Done (used !(a&&b) construct)

> 
> * Never "else" after "return" (please fix remainder of function while here).

Done

> 
>
http://codereview.chromium.org/6324020/diff/1/chrome/browser/download/downloa...
> File chrome/browser/download/download_util.h (right):
> 
>
http://codereview.chromium.org/6324020/diff/1/chrome/browser/download/downloa...
> chrome/browser/download/download_util.h:210: // Whether a given download
should
> be considered potentially dangerous.
> Two nits:
> 
> * It'd be nice to expand the comment here, e.g.:
> 
> // Returns true if this download should show the "dangerous file" warning. 
This
> may vary depending on whether the user explicitly initiated the download and
> whether the user has marked this filetype as "auto open" (both of which reduce
> the likelihood that we'll show a warning).

Agree, done.

> 
> * Please fix "DownloadCreateInfo *info" while here.

Done.

Powered by Google App Engine
This is Rietveld 408576698