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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
132 | 132 |
133 void UploadList::GetUploads(size_t max_count, | 133 void UploadList::GetUploads(size_t max_count, |
134 std::vector<UploadInfo>* uploads) { | 134 std::vector<UploadInfo>* uploads) { |
135 DCHECK(thread_checker_.CalledOnValidThread()); | 135 DCHECK(thread_checker_.CalledOnValidThread()); |
136 std::copy(uploads_.begin(), | 136 std::copy(uploads_.begin(), |
137 uploads_.begin() + std::min(uploads_.size(), max_count), | 137 uploads_.begin() + std::min(uploads_.size(), max_count), |
138 std::back_inserter(*uploads)); | 138 std::back_inserter(*uploads)); |
139 } | 139 } |
140 | 140 |
141 void UploadList::RequestSingleCrashUploadAsync(const std::string& local_id) { | 141 void UploadList::RequestSingleCrashUploadAsync(const std::string& local_id) { |
142 #if defined(OS_WIN) || defined(OS_MACOSX) | |
Mark Mentovai
2016/09/15 00:02:30
Ditto
| |
143 DCHECK(thread_checker_.CalledOnValidThread()); | 142 DCHECK(thread_checker_.CalledOnValidThread()); |
144 worker_pool_->PostTask( | 143 worker_pool_->PostTask( |
145 FROM_HERE, | 144 FROM_HERE, |
146 base::Bind(&UploadList::RequestSingleCrashUpload, this, local_id)); | 145 base::Bind(&UploadList::RequestSingleCrashUpload, this, local_id)); |
147 #endif | |
148 } | 146 } |
149 | 147 |
150 void UploadList::RequestSingleCrashUpload(const std::string& local_id) { | 148 void UploadList::RequestSingleCrashUpload(const std::string& local_id) { |
151 // Manual uploads for not uploaded crash reports are not available for non | 149 // Manual uploads for not yet uploaded crash reports are only available for |
Mark Mentovai
2016/09/15 00:02:30
not-yet
Ilya Sherman
2016/09/21 22:50:03
Done.
| |
152 // crashpad systems. | 150 // Crashpad systems or on Android. |
153 NOTREACHED(); | 151 NOTREACHED(); |
154 } | 152 } |
OLD | NEW |