| OLD | NEW |
| 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 // `7MM"""Mq. `7MM | 5 // `7MM"""Mq. `7MM |
| 6 // MM `MM. MM | 6 // MM `MM. MM |
| 7 // MM ,M9 .gP"Ya ,6"Yb. ,M""bMM `7MMpMMMb.pMMMb. .gP"Ya | 7 // MM ,M9 .gP"Ya ,6"Yb. ,M""bMM `7MMpMMMb.pMMMb. .gP"Ya |
| 8 // MMmmdM9 ,M' Yb 8) MM ,AP MM MM MM MM ,M' Yb | 8 // MMmmdM9 ,M' Yb 8) MM ,AP MM MM MM MM ,M' Yb |
| 9 // MM YM. 8M"""""" ,pm9MM 8MI MM MM MM MM 8M"""""" | 9 // MM YM. 8M"""""" ,pm9MM 8MI MM MM MM MM 8M"""""" |
| 10 // MM `Mb.YM. , 8M MM `Mb MM MM MM MM YM. , | 10 // MM `Mb.YM. , 8M MM `Mb MM MM MM MM YM. , |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 this.os = remoting.ChromotingEvent.Os.CHROMEOS; | 115 this.os = remoting.ChromotingEvent.Os.CHROMEOS; |
| 116 } | 116 } |
| 117 this.browser_version = systemInfo.chromeVersion; | 117 this.browser_version = systemInfo.chromeVersion; |
| 118 | 118 |
| 119 // App Info. | 119 // App Info. |
| 120 this.webapp_version = chrome.runtime.getManifest().version; | 120 this.webapp_version = chrome.runtime.getManifest().version; |
| 121 this.application_id = chrome.runtime.id; | 121 this.application_id = chrome.runtime.id; |
| 122 }; | 122 }; |
| 123 | 123 |
| 124 /** | 124 /** |
| 125 * Populates the corresponding fields in the logEntry based on |error|. |
| 126 * |
| 127 * @param {remoting.Error} error |
| 128 */ |
| 129 remoting.ChromotingEvent.prototype.setError = function(error) { |
| 130 var Tag = remoting.Error.Tag; |
| 131 var detail = /** @type {string} */ (error.getDetail()); |
| 132 |
| 133 switch (error.getTag()) { |
| 134 case Tag.HOST_IS_OFFLINE: |
| 135 if (detail) { |
| 136 this.xmpp_error = new remoting.ChromotingEvent.XmppError(detail); |
| 137 } |
| 138 break; |
| 139 case Tag.MISSING_PLUGIN: |
| 140 console.assert(detail, 'Missing PNaCl plugin last error string.'); |
| 141 this.raw_plugin_error = detail; |
| 142 } |
| 143 |
| 144 this.connection_error = error.toConnectionError(); |
| 145 }; |
| 146 |
| 147 /** |
| 125 * @param {remoting.ChromotingEvent} event | 148 * @param {remoting.ChromotingEvent} event |
| 126 * @return {boolean} | 149 * @return {boolean} |
| 127 */ | 150 */ |
| 128 remoting.ChromotingEvent.isEndOfSession = function(event) { | 151 remoting.ChromotingEvent.isEndOfSession = function(event) { |
| 129 if (event.type !== remoting.ChromotingEvent.Type.SESSION_STATE) { | 152 if (event.type !== remoting.ChromotingEvent.Type.SESSION_STATE) { |
| 130 return false; | 153 return false; |
| 131 } | 154 } |
| 132 var endStates = [ | 155 var endStates = [ |
| 133 remoting.ChromotingEvent.SessionState.CLOSED, | 156 remoting.ChromotingEvent.SessionState.CLOSED, |
| 134 remoting.ChromotingEvent.SessionState.CONNECTION_DROPPED, | 157 remoting.ChromotingEvent.SessionState.CONNECTION_DROPPED, |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 FAILED_LATE: 5 | 314 FAILED_LATE: 5 |
| 292 }; | 315 }; |
| 293 | 316 |
| 294 /** @enum {number} */ | 317 /** @enum {number} */ |
| 295 remoting.ChromotingEvent.AuthMethod = { | 318 remoting.ChromotingEvent.AuthMethod = { |
| 296 PIN: 1, | 319 PIN: 1, |
| 297 ACCESS_CODE: 2, | 320 ACCESS_CODE: 2, |
| 298 PINLESS: 3, | 321 PINLESS: 3, |
| 299 THIRD_PARTY: 4, | 322 THIRD_PARTY: 4, |
| 300 }; | 323 }; |
| OLD | NEW |