| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 void UploadList::GetUploads(size_t max_count, | 149 void UploadList::GetUploads(size_t max_count, |
| 150 std::vector<UploadInfo>* uploads) { | 150 std::vector<UploadInfo>* uploads) { |
| 151 DCHECK(sequence_checker_.CalledOnValidSequence()); | 151 DCHECK(sequence_checker_.CalledOnValidSequence()); |
| 152 std::copy(uploads_.begin(), | 152 std::copy(uploads_.begin(), |
| 153 uploads_.begin() + std::min(uploads_.size(), max_count), | 153 uploads_.begin() + std::min(uploads_.size(), max_count), |
| 154 std::back_inserter(*uploads)); | 154 std::back_inserter(*uploads)); |
| 155 } | 155 } |
| 156 | 156 |
| 157 void UploadList::RequestSingleCrashUploadAsync(const std::string& local_id) { | 157 void UploadList::RequestSingleCrashUploadAsync(const std::string& local_id) { |
| 158 DCHECK(sequence_checker_.CalledOnValidSequence()); | 158 DCHECK(sequence_checker_.CalledOnValidSequence()); |
| 159 #if defined(OS_WIN) || defined(OS_MACOSX) | |
| 160 task_runner_->PostTask( | 159 task_runner_->PostTask( |
| 161 FROM_HERE, | 160 FROM_HERE, |
| 162 base::Bind(&UploadList::RequestSingleCrashUpload, this, local_id)); | 161 base::Bind(&UploadList::RequestSingleCrashUpload, this, local_id)); |
| 163 #endif | |
| 164 } | 162 } |
| 165 | 163 |
| 166 void UploadList::RequestSingleCrashUpload(const std::string& local_id) { | 164 void UploadList::RequestSingleCrashUpload(const std::string& local_id) { |
| 167 // Manual uploads for not uploaded crash reports are not available for non | 165 // Manual uploads for not-yet uploaded crash reports are only available for |
| 168 // crashpad systems. | 166 // Crashpad systems and for Android. |
| 169 NOTREACHED(); | 167 NOTREACHED(); |
| 170 } | 168 } |
| OLD | NEW |