| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "chrome/browser/crash_upload_list/crash_upload_list_android.h" | 5 #include "chrome/browser/crash_upload_list/crash_upload_list_android.h" |
| 6 | 6 |
| 7 #include <utility> |
| 8 |
| 7 #include "base/files/file.h" | 9 #include "base/files/file.h" |
| 8 #include "base/files/file_enumerator.h" | 10 #include "base/files/file_enumerator.h" |
| 9 #include "base/files/file_util.h" | 11 #include "base/files/file_util.h" |
| 10 #include "base/threading/sequenced_worker_pool.h" | 12 #include "base/task_runner.h" |
| 11 #include "ui/base/text/bytes_formatting.h" | 13 #include "ui/base/text/bytes_formatting.h" |
| 12 | 14 |
| 13 CrashUploadListAndroid::CrashUploadListAndroid( | 15 CrashUploadListAndroid::CrashUploadListAndroid( |
| 14 Delegate* delegate, | 16 Delegate* delegate, |
| 15 const base::FilePath& upload_log_path, | 17 const base::FilePath& upload_log_path, |
| 16 const scoped_refptr<base::SequencedWorkerPool>& worker_pool) | 18 scoped_refptr<base::TaskRunner> task_runner) |
| 17 : CrashUploadList(delegate, upload_log_path, worker_pool) {} | 19 : CrashUploadList(delegate, upload_log_path, std::move(task_runner)) {} |
| 18 | 20 |
| 19 CrashUploadListAndroid::~CrashUploadListAndroid() {} | 21 CrashUploadListAndroid::~CrashUploadListAndroid() {} |
| 20 | 22 |
| 21 void CrashUploadListAndroid::LoadUploadList( | 23 void CrashUploadListAndroid::LoadUploadList( |
| 22 std::vector<UploadList::UploadInfo>* uploads) { | 24 std::vector<UploadList::UploadInfo>* uploads) { |
| 23 // This will load the list of successfully uploaded logs. | 25 // This will load the list of successfully uploaded logs. |
| 24 CrashUploadList::LoadUploadList(uploads); | 26 CrashUploadList::LoadUploadList(uploads); |
| 25 | 27 |
| 26 LoadUnsuccessfulUploadList(uploads); | 28 LoadUnsuccessfulUploadList(uploads); |
| 27 } | 29 } |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 if (pos == std::string::npos) | 61 if (pos == std::string::npos) |
| 60 continue; | 62 continue; |
| 61 | 63 |
| 62 id = id.substr(pos + 1); | 64 id = id.substr(pos + 1); |
| 63 UploadList::UploadInfo upload(id, info.creation_time, | 65 UploadList::UploadInfo upload(id, info.creation_time, |
| 64 UploadList::UploadInfo::State::NotUploaded, | 66 UploadList::UploadInfo::State::NotUploaded, |
| 65 ui::FormatBytes(file_size)); | 67 ui::FormatBytes(file_size)); |
| 66 uploads->push_back(upload); | 68 uploads->push_back(upload); |
| 67 } | 69 } |
| 68 } | 70 } |
| OLD | NEW |