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

Unified Diff: remoting/webapp/crd/js/me2me_activity.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
« no previous file with comments | « remoting/webapp/crd/js/it2me_activity.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/webapp/crd/js/me2me_activity.js
diff --git a/remoting/webapp/crd/js/me2me_activity.js b/remoting/webapp/crd/js/me2me_activity.js
index a73ed493459344e921aba2bed736f190e2940d5e..d479df75f1bffe59bf4b3963240bc6ab0f37b52b 100644
--- a/remoting/webapp/crd/js/me2me_activity.js
+++ b/remoting/webapp/crd/js/me2me_activity.js
@@ -54,19 +54,16 @@ remoting.Me2MeActivity.prototype.start = function() {
var Event = remoting.ChromotingEvent;
this.logger_ = this.createLogger_(Event.SessionEntryPoint.CONNECT_BUTTON);
- this.logger_.logSessionStateChange(Event.SessionState.STARTED,
- Event.ConnectionError.NONE);
-
- var errorTag = Event.ConnectionError.NONE;
+ this.logger_.logSessionStateChange(Event.SessionState.STARTED);
function handleError(/** remoting.Error */ error) {
if (error.isCancel()) {
remoting.setMode(remoting.AppMode.HOME);
- that.logger_.logSessionStateChange(Event.SessionState.CONNECTION_CANCELED,
- errorTag);
+ that.logger_.logSessionStateChange(
+ Event.SessionState.CONNECTION_CANCELED);
} else {
- that.logger_.logSessionStateChange(Event.SessionState.CONNECTION_FAILED,
- error.toConnectionError());
+ that.logger_.logSessionStateChange(
+ Event.SessionState.CONNECTION_FAILED, error);
that.showErrorMessage_(error);
}
}
@@ -75,8 +72,7 @@ remoting.Me2MeActivity.prototype.start = function() {
return that.host_.options.load();
}).catch(remoting.Error.handler(function(/** remoting.Error */ error) {
// User cancels out of the Host upgrade dialog. Report it as bad version.
- errorTag = Event.ConnectionError.BAD_VERSION;
- throw error;
+ throw new remoting.Error(remoting.Error.Tag.BAD_VERSION);
})).then(
this.connect_.bind(this)
).catch(remoting.Error.handler(handleError));
@@ -118,8 +114,7 @@ remoting.Me2MeActivity.prototype.createLogger_ = function(entryPoint) {
remoting.Me2MeActivity.prototype.reconnect_ = function(entryPoint) {
this.logger_ = this.createLogger_(entryPoint);
var Event = remoting.ChromotingEvent;
- this.logger_.logSessionStateChange(Event.SessionState.STARTED,
- Event.ConnectionError.NONE);
+ this.logger_.logSessionStateChange(Event.SessionState.STARTED);
this.connect_();
};
« no previous file with comments | « remoting/webapp/crd/js/it2me_activity.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698