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 #include "content/browser/download/base_file.h" | 5 #include "content/browser/download/base_file.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/files/file.h" | 10 #include "base/files/file.h" |
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 base::File::Error file_error = base::File::OSErrorToFileError(os_error); | 367 base::File::Error file_error = base::File::OSErrorToFileError(os_error); |
368 return LogInterruptReason( | 368 return LogInterruptReason( |
369 operation, os_error, | 369 operation, os_error, |
370 ConvertFileErrorToInterruptReason(file_error)); | 370 ConvertFileErrorToInterruptReason(file_error)); |
371 } | 371 } |
372 | 372 |
373 DownloadInterruptReason BaseFile::LogInterruptReason( | 373 DownloadInterruptReason BaseFile::LogInterruptReason( |
374 const char* operation, | 374 const char* operation, |
375 int os_error, | 375 int os_error, |
376 DownloadInterruptReason reason) { | 376 DownloadInterruptReason reason) { |
377 DVLOG(1) << __FUNCTION__ << "() operation:" << operation | 377 DVLOG(1) << __func__ << "() operation:" << operation |
378 << " os_error:" << os_error | 378 << " os_error:" << os_error |
379 << " reason:" << DownloadInterruptReasonToString(reason); | 379 << " reason:" << DownloadInterruptReasonToString(reason); |
380 bound_net_log_.AddEvent( | 380 bound_net_log_.AddEvent( |
381 net::NetLog::TYPE_DOWNLOAD_FILE_ERROR, | 381 net::NetLog::TYPE_DOWNLOAD_FILE_ERROR, |
382 base::Bind(&FileInterruptedNetLogCallback, operation, os_error, reason)); | 382 base::Bind(&FileInterruptedNetLogCallback, operation, os_error, reason)); |
383 return reason; | 383 return reason; |
384 } | 384 } |
385 | 385 |
386 } // namespace content | 386 } // namespace content |
OLD | NEW |