OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/upload_list/upload_list.h" | 5 #include "components/upload_list/upload_list.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <iterator> | 8 #include <iterator> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 delegate_->OnUploadListAvailable(); | 126 delegate_->OnUploadListAvailable(); |
127 } | 127 } |
128 | 128 |
129 void UploadList::GetUploads(size_t max_count, | 129 void UploadList::GetUploads(size_t max_count, |
130 std::vector<UploadInfo>* uploads) { | 130 std::vector<UploadInfo>* uploads) { |
131 DCHECK(thread_checker_.CalledOnValidThread()); | 131 DCHECK(thread_checker_.CalledOnValidThread()); |
132 std::copy(uploads_.begin(), | 132 std::copy(uploads_.begin(), |
133 uploads_.begin() + std::min(uploads_.size(), max_count), | 133 uploads_.begin() + std::min(uploads_.size(), max_count), |
134 std::back_inserter(*uploads)); | 134 std::back_inserter(*uploads)); |
135 } | 135 } |
| 136 |
| 137 void UploadList::RequestSingleCrashUploadAsync(const std::string& local_id) { |
| 138 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 139 DCHECK(thread_checker_.CalledOnValidThread()); |
| 140 worker_pool_->PostTask( |
| 141 FROM_HERE, |
| 142 base::Bind(&UploadList::RequestSingleCrashUpload, this, local_id)); |
| 143 #endif |
| 144 } |
| 145 |
| 146 void UploadList::RequestSingleCrashUpload(const std::string& local_id) { |
| 147 // Manual uploads for not uploaded crash reports are not available for non |
| 148 // crashpad systems. |
| 149 NOTREACHED(); |
| 150 } |
OLD | NEW |