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

Unified Diff: chrome/browser/resources/pdf/pdf.js

Issue 2407713002: Limit PDF helper extension to print preview only (Closed)
Patch Set: Use location.origin instead of location.ancestorOrigins. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/resources/pdf/browser_api.js ('k') | content/public/test/browser_test_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/pdf/pdf.js
diff --git a/chrome/browser/resources/pdf/pdf.js b/chrome/browser/resources/pdf/pdf.js
index 9805660b562c34e82cae189e4670abaace68eb8e..e5acd4b355becbdf0c9586158b7e5960bfa53d4a 100644
--- a/chrome/browser/resources/pdf/pdf.js
+++ b/chrome/browser/resources/pdf/pdf.js
@@ -101,7 +101,7 @@ function PDFViewer(browserApi) {
this.delayedScriptingMessages_ = [];
- this.isPrintPreview_ = this.originalUrl_.startsWith('chrome://print');
+ this.isPrintPreview_ = location.origin === 'chrome://print';
// Parse open pdf parameters.
this.paramsParser_ =
« no previous file with comments | « chrome/browser/resources/pdf/browser_api.js ('k') | content/public/test/browser_test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698