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

Side by Side Diff: chrome/browser/resources/gaia_auth_host/saml_handler.js

Issue 1072643002: sign-in: Don't inject into none http/https page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 <include src="post_message_channel.js"> 5 <include src="post_message_channel.js">
6 6
7 /** 7 /**
8 * @fileoverview Saml support for webview based auth. 8 * @fileoverview Saml support for webview based auth.
9 */ 9 */
10 10
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 * Invoked on the webview's loadcommit event for both main and sub frames. 259 * Invoked on the webview's loadcommit event for both main and sub frames.
260 * @private 260 * @private
261 */ 261 */
262 onLoadCommit_: function(e) { 262 onLoadCommit_: function(e) {
263 // Skip this loadcommit if the top level load is just aborted. 263 // Skip this loadcommit if the top level load is just aborted.
264 if (e.isTopLevel && e.url === this.abortedTopLevelUrl_) { 264 if (e.isTopLevel && e.url === this.abortedTopLevelUrl_) {
265 this.abortedTopLevelUrl_ = null; 265 this.abortedTopLevelUrl_ = null;
266 return; 266 return;
267 } 267 }
268 268
269 // Skip for none http/https url.
270 if (e.url.indexOf('https://') != 0 &&
271 e.url.indexOf('http://') != 0) {
272 return;
273 }
274
269 this.isSamlPage_ = this.pendingIsSamlPage_; 275 this.isSamlPage_ = this.pendingIsSamlPage_;
270 this.injectJs_(); 276 this.injectJs_();
271 }, 277 },
272 278
273 /** 279 /**
274 * Handler for webRequest.onBeforeRequest, invoked when content served over 280 * Handler for webRequest.onBeforeRequest, invoked when content served over
275 * an unencrypted connection is detected. Determines whether the request 281 * an unencrypted connection is detected. Determines whether the request
276 * should be blocked and if so, signals that an error message needs to be 282 * should be blocked and if so, signals that an error message needs to be
277 * shown. 283 * shown.
278 * @param {Object} details 284 * @param {Object} details
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 * @param {string} samlInjectedJs JS code to inejct for Saml. 459 * @param {string} samlInjectedJs JS code to inejct for Saml.
454 */ 460 */
455 SamlHandler.setSamlInjectedJs = function(samlInjectedJs) { 461 SamlHandler.setSamlInjectedJs = function(samlInjectedJs) {
456 injectedJs = samlInjectedJs; 462 injectedJs = samlInjectedJs;
457 }; 463 };
458 464
459 return { 465 return {
460 SamlHandler: SamlHandler 466 SamlHandler: SamlHandler
461 }; 467 };
462 }); 468 });
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698