OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 /** | 5 /** |
6 * @fileoverview | 6 * @fileoverview |
7 * A background script of the auth extension that bridges the communication | 7 * A background script of the auth extension that bridges the communication |
8 * between the main and injected scripts. | 8 * between the main and injected scripts. |
9 * | 9 * |
10 * Here is an overview of the communication flow when SAML is being used: | 10 * Here is an overview of the communication flow when SAML is being used: |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 * Handler for 'authStarted' signal sent from the main script. | 409 * Handler for 'authStarted' signal sent from the main script. |
410 */ | 410 */ |
411 onAuthStarted_: function() { | 411 onAuthStarted_: function() { |
412 this.authStarted_ = true; | 412 this.authStarted_ = true; |
413 this.passwordStore_ = {}; | 413 this.passwordStore_ = {}; |
414 this.isSAML_ = false; | 414 this.isSAML_ = false; |
415 }, | 415 }, |
416 | 416 |
417 /** | 417 /** |
418 * Handler for 'getScrapedPasswords' request sent from the main script. | 418 * Handler for 'getScrapedPasswords' request sent from the main script. |
419 * @return {Array.<string>} The array with de-duped scraped passwords. | 419 * @return {Array<string>} The array with de-duped scraped passwords. |
420 */ | 420 */ |
421 onGetScrapedPasswords_: function() { | 421 onGetScrapedPasswords_: function() { |
422 var passwords = {}; | 422 var passwords = {}; |
423 for (var property in this.passwordStore_) { | 423 for (var property in this.passwordStore_) { |
424 passwords[this.passwordStore_[property]] = true; | 424 passwords[this.passwordStore_[property]] = true; |
425 } | 425 } |
426 return Object.keys(passwords); | 426 return Object.keys(passwords); |
427 }, | 427 }, |
428 | 428 |
429 /** | 429 /** |
(...skipping 22 matching lines...) Expand all Loading... |
452 isSAMLPage: this.isSAML_}); | 452 isSAMLPage: this.isSAML_}); |
453 }, | 453 }, |
454 | 454 |
455 onGetSAMLFlag_: function(msg) { | 455 onGetSAMLFlag_: function(msg) { |
456 return this.isSAML_; | 456 return this.isSAML_; |
457 } | 457 } |
458 }; | 458 }; |
459 | 459 |
460 var backgroundBridgeManager = new BackgroundBridgeManager(); | 460 var backgroundBridgeManager = new BackgroundBridgeManager(); |
461 backgroundBridgeManager.run(); | 461 backgroundBridgeManager.run(); |
OLD | NEW |