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

Unified Diff: chrome/browser/resources/gaia_auth/saml_injected.js

Issue 384003002: [cleanup] SAML is always enabled. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Misprint. Created 6 years, 5 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
Index: chrome/browser/resources/gaia_auth/saml_injected.js
diff --git a/chrome/browser/resources/gaia_auth/saml_injected.js b/chrome/browser/resources/gaia_auth/saml_injected.js
index e41dfebec624bf6fc801f6e391ee305f76d5174a..f2382259a585ecd7363a965ed5032a392c80113f 100644
--- a/chrome/browser/resources/gaia_auth/saml_injected.js
+++ b/chrome/browser/resources/gaia_auth/saml_injected.js
@@ -134,14 +134,6 @@
};
/**
- * Returns true if the script is injected into auth main page.
- */
- function isAuthMainPage() {
- return window.location.href.indexOf(
- 'chrome-extension://mfffpogegjflfpflabcdkioaeobkgjik/main.html') == 0;
- }
-
- /**
* Heuristic test whether the current page is a relevant SAML page.
* Current implementation checks if it is a http or https page and has
* some content in it.
@@ -155,26 +147,17 @@
return document.body.scrollWidth > 50 && document.body.scrollHeight > 50;
}
- if (isAuthMainPage()) {
- // Use an event to signal the auth main to enable SAML support.
- var e = document.createEvent('Event');
- e.initEvent('enableSAML', false, false);
- document.dispatchEvent(e);
- } else {
- var channel;
- var passwordScraper;
- if (isSAMLPage()) {
- var pageURL = window.location.href;
-
- channel = new Channel();
- channel.connect('injected');
- channel.send({name: 'pageLoaded', url: pageURL});
-
- apiCallForwarder = new APICallForwarder();
- apiCallForwarder.init(channel);
-
- passwordScraper = new PasswordInputScraper();
- passwordScraper.init(channel, pageURL, document.documentElement);
- }
+ if (isSAMLPage()) {
+ var pageURL = window.location.href;
+
+ var channel = new Channel();
+ channel.connect('injected');
+ channel.send({name: 'pageLoaded', url: pageURL});
+
+ var apiCallForwarder = new APICallForwarder();
+ apiCallForwarder.init(channel);
+
+ var passwordScraper = new PasswordInputScraper();
+ passwordScraper.init(channel, pageURL, document.documentElement);
}
})();

Powered by Google App Engine
This is Rietveld 408576698