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

Unified Diff: remoting/webapp/base/js/xmpp_error_cache.js

Issue 1410563006: [Chromoting] SessionLogger refactor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 1 month 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: remoting/webapp/base/js/xmpp_error_cache.js
diff --git a/remoting/webapp/base/js/xmpp_error_cache.js b/remoting/webapp/base/js/xmpp_error_cache.js
index 79a91385ad3cf90b540390ede38e9a3cc507ca9c..eabbdb3f2c88ee0e9c248dda31dc3c1c2c8d2403 100644
--- a/remoting/webapp/base/js/xmpp_error_cache.js
+++ b/remoting/webapp/base/js/xmpp_error_cache.js
@@ -19,17 +19,16 @@ var remoting = remoting || {};
*/
remoting.XmppErrorCache = function() {
- /** @private {remoting.ChromotingEvent.XmppError} */
- this.firstError_ = null;
+ /** @private {string} */
+ this.firstErrorStanza_ = '';
};
/**
- * @return {remoting.ChromotingEvent.XmppError} The first XMPP error that the
- * monitor encountered. Returns null if no errors have been encountered so
- * far.
+ * @return {string} The first XMPP error stanza that the monitor encountered.
+ * Returns an empty string if no errors have been encountered so far.
*/
-remoting.XmppErrorCache.prototype.getFirstError = function() {
- return this.firstError_;
+remoting.XmppErrorCache.prototype.getFirstErrorStanza = function() {
+ return this.firstErrorStanza_;
};
/**
@@ -38,7 +37,7 @@ remoting.XmppErrorCache.prototype.getFirstError = function() {
* @param {Element} iqNode
*/
remoting.XmppErrorCache.prototype.processStanza = function(iqNode) {
- if (this.firstError_ != null) {
+ if (this.firstErrorStanza_ != '') {
return;
}
// The XML structure is as follows:
@@ -51,7 +50,7 @@ remoting.XmppErrorCache.prototype.processStanza = function(iqNode) {
}
var strippedStanza = this.stripPII_(iqNode);
- this.firstError_ = new remoting.ChromotingEvent.XmppError(strippedStanza);
+ this.firstErrorStanza_ = strippedStanza;
};
/**
« no previous file with comments | « remoting/webapp/base/js/telemetry_event_writer_unittest.js ('k') | remoting/webapp/base/js/xmpp_error_cache_unittest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698