OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 * This view displays options for importing data from a log file. | 6 * This view displays options for importing data from a log file. |
7 */ | 7 */ |
8 var ImportView = (function() { | 8 var ImportView = (function() { |
9 'use strict'; | 9 'use strict'; |
10 | 10 |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 */ | 139 */ |
140 onLoadLogFileError: function(event) { | 140 onLoadLogFileError: function(event) { |
141 this.loadFileElement_.value = null; | 141 this.loadFileElement_.value = null; |
142 this.setLoadFileStatus( | 142 this.setLoadFileStatus( |
143 'Error ' + getKeyWithValue(FileError, event.target.error.code) + | 143 'Error ' + getKeyWithValue(FileError, event.target.error.code) + |
144 '. Unable to read file.', | 144 '. Unable to read file.', |
145 false); | 145 false); |
146 }, | 146 }, |
147 | 147 |
148 onLoadLogFile: function(logFile, event) { | 148 onLoadLogFile: function(logFile, event) { |
149 var result = log_util.loadLogFile(event.target.result, logFile.fileName); | 149 var result = log_util.loadLogFile(event.target.result, logFile.name); |
150 this.setLoadFileStatus(result, false); | 150 this.setLoadFileStatus(result, false); |
151 }, | 151 }, |
152 | 152 |
153 /** | 153 /** |
154 * Sets the load from file status text, displayed below the load file | 154 * Sets the load from file status text, displayed below the load file |
155 * button, to |text|. Also enables or disables the load buttons based on | 155 * button, to |text|. Also enables or disables the load buttons based on |
156 * the value of |isLoading|, which must be true if the load process is still | 156 * the value of |isLoading|, which must be true if the load process is still |
157 * ongoing, and false when the operation has stopped, regardless of success | 157 * ongoing, and false when the operation has stopped, regardless of success |
158 * of failure. Also, when loading is done, replaces the load button so the | 158 * of failure. Also, when loading is done, replaces the load button so the |
159 * same file can be loaded again. | 159 * same file can be loaded again. |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 this.loadedInfoOsType_.innerText = ClientInfo.os_type; | 219 this.loadedInfoOsType_.innerText = ClientInfo.os_type; |
220 this.loadedInfoCommandLine_.innerText = ClientInfo.command_line; | 220 this.loadedInfoCommandLine_.innerText = ClientInfo.command_line; |
221 | 221 |
222 // User comments will not be available when dumped from command line. | 222 // User comments will not be available when dumped from command line. |
223 this.loadedInfoUserComments_.innerText = userComments || ''; | 223 this.loadedInfoUserComments_.innerText = userComments || ''; |
224 } | 224 } |
225 }; | 225 }; |
226 | 226 |
227 return ImportView; | 227 return ImportView; |
228 })(); | 228 })(); |
OLD | NEW |