| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "net/ftp/ftp_network_transaction.h" | 5 #include "net/ftp/ftp_network_transaction.h" |
| 6 | 6 |
| 7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
| 8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
| 9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
| 10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
| (...skipping 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1291 // Other kind of error. | 1291 // Other kind of error. |
| 1292 NET_ERROR_OTHER = 20, | 1292 NET_ERROR_OTHER = 20, |
| 1293 | 1293 |
| 1294 NUM_OF_NET_ERROR_TYPES | 1294 NUM_OF_NET_ERROR_TYPES |
| 1295 } type; | 1295 } type; |
| 1296 switch (result) { | 1296 switch (result) { |
| 1297 case OK: | 1297 case OK: |
| 1298 type = NET_ERROR_OK; | 1298 type = NET_ERROR_OK; |
| 1299 break; | 1299 break; |
| 1300 case ERR_ACCESS_DENIED: | 1300 case ERR_ACCESS_DENIED: |
| 1301 case ERR_NETWORK_ACCESS_DENIED: |
| 1301 type = NET_ERROR_ACCESS_DENIED; | 1302 type = NET_ERROR_ACCESS_DENIED; |
| 1302 break; | 1303 break; |
| 1303 case ERR_TIMED_OUT: | 1304 case ERR_TIMED_OUT: |
| 1304 type = NET_ERROR_TIMED_OUT; | 1305 type = NET_ERROR_TIMED_OUT; |
| 1305 break; | 1306 break; |
| 1306 case ERR_CONNECTION_ABORTED: | 1307 case ERR_CONNECTION_ABORTED: |
| 1307 case ERR_CONNECTION_RESET: | 1308 case ERR_CONNECTION_RESET: |
| 1308 case ERR_CONNECTION_CLOSED: | 1309 case ERR_CONNECTION_CLOSED: |
| 1309 type = NET_ERROR_CONNECTION_BROKEN; | 1310 type = NET_ERROR_CONNECTION_BROKEN; |
| 1310 break; | 1311 break; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 1332 if (!had_error_type[type]) { | 1333 if (!had_error_type[type]) { |
| 1333 had_error_type[type] = true; | 1334 had_error_type[type] = true; |
| 1334 UMA_HISTOGRAM_ENUMERATION("Net.FtpDataConnectionErrorHappened", | 1335 UMA_HISTOGRAM_ENUMERATION("Net.FtpDataConnectionErrorHappened", |
| 1335 type, NUM_OF_NET_ERROR_TYPES); | 1336 type, NUM_OF_NET_ERROR_TYPES); |
| 1336 } | 1337 } |
| 1337 UMA_HISTOGRAM_ENUMERATION("Net.FtpDataConnectionErrorCount", | 1338 UMA_HISTOGRAM_ENUMERATION("Net.FtpDataConnectionErrorCount", |
| 1338 type, NUM_OF_NET_ERROR_TYPES); | 1339 type, NUM_OF_NET_ERROR_TYPES); |
| 1339 } | 1340 } |
| 1340 | 1341 |
| 1341 } // namespace net | 1342 } // namespace net |
| OLD | NEW |