Chromium Code Reviews| Index: chrome/browser/resources/pdf/open_pdf_params_parser.js |
| diff --git a/chrome/browser/resources/pdf/open_pdf_params_parser.js b/chrome/browser/resources/pdf/open_pdf_params_parser.js |
| index f4fe8e7354a1617a6c5929c23e72379af59b9465..b01adea31b69bd87c6617e538a2a163e080ae468 100644 |
| --- a/chrome/browser/resources/pdf/open_pdf_params_parser.js |
| +++ b/chrome/browser/resources/pdf/open_pdf_params_parser.js |
| @@ -60,6 +60,13 @@ OpenPDFParamsParser.prototype = { |
| return; |
| var paramTokens = originalUrl.substring(paramIndex + 1).split('&'); |
| + // Handle the case of http://foo.com/bar#NAMEDDEST. This is not explicitly |
| + // mentioned except by example in the Adobe "PDF Open Parameters" document. |
|
raymes
2015/01/13 01:59:31
How come you removed this?
|
| + if ((paramTokens.length == 1) && (paramTokens[0].search('=') == -1)) { |
| + this.urlParams['nameddest'] = paramTokens[0]; |
|
raymes
2015/01/11 23:08:41
We don't actually want to store nameddest in urlPa
Deepak
2015/01/12 09:21:43
Done.
raymes
2015/01/13 01:59:31
Please take a look at the comment above again, in
|
| + return; |
| + } |
| + |
| var paramsDictionary = {}; |
| for (var i = 0; i < paramTokens.length; ++i) { |
| var keyValueSplit = paramTokens[i].split('='); |
| @@ -78,4 +85,7 @@ OpenPDFParamsParser.prototype = { |
| if ('zoom' in paramsDictionary) |
| this.parseZoomParam_(paramsDictionary['zoom']); |
| } |
| + |
| + if ('nameddest' in paramsDictionary) |
| + this.urlParams['nameddest'] = paramsDictionary['nameddest']; |
| }; |