| 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/public/test/test_file_error_injector.h" | 5 #include "content/public/test/test_file_error_injector.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 bool calculate_hash, | 84 bool calculate_hash, |
| 85 const net::BoundNetLog& bound_net_log, | 85 const net::BoundNetLog& bound_net_log, |
| 86 const content::TestFileErrorInjector::FileErrorInfo& error_info, | 86 const content::TestFileErrorInjector::FileErrorInfo& error_info, |
| 87 const ConstructionCallback& ctor_callback, | 87 const ConstructionCallback& ctor_callback, |
| 88 const DestructionCallback& dtor_callback) | 88 const DestructionCallback& dtor_callback) |
| 89 : DownloadFileImpl(info, | 89 : DownloadFileImpl(info, |
| 90 stream.Pass(), | 90 stream.Pass(), |
| 91 request_handle, | 91 request_handle, |
| 92 download_manager, | 92 download_manager, |
| 93 calculate_hash, | 93 calculate_hash, |
| 94 scoped_ptr<PowerSaveBlocker>(NULL).Pass(), | 94 scoped_ptr<content::PowerSaveBlocker>(NULL).Pass(), |
| 95 bound_net_log), | 95 bound_net_log), |
| 96 source_url_(info->url()), | 96 source_url_(info->url()), |
| 97 error_info_(error_info), | 97 error_info_(error_info), |
| 98 destruction_callback_(dtor_callback) { | 98 destruction_callback_(dtor_callback) { |
| 99 ctor_callback.Run(source_url_, info->download_id); | 99 ctor_callback.Run(source_url_, info->download_id); |
| 100 } | 100 } |
| 101 | 101 |
| 102 DownloadFileWithErrors::~DownloadFileWithErrors() { | 102 DownloadFileWithErrors::~DownloadFileWithErrors() { |
| 103 destruction_callback_.Run(source_url_); | 103 destruction_callback_.Run(source_url_); |
| 104 } | 104 } |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 case FILE_OPERATION_RENAME: | 422 case FILE_OPERATION_RENAME: |
| 423 return "RENAME"; | 423 return "RENAME"; |
| 424 default: | 424 default: |
| 425 break; | 425 break; |
| 426 } | 426 } |
| 427 | 427 |
| 428 return "Unknown"; | 428 return "Unknown"; |
| 429 } | 429 } |
| 430 | 430 |
| 431 } // namespace content | 431 } // namespace content |
| OLD | NEW |