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 <stddef.h> |
| 8 |
7 #include <algorithm> | 9 #include <algorithm> |
8 #include <iterator> | 10 #include <iterator> |
9 | 11 |
10 #include "base/bind.h" | 12 #include "base/bind.h" |
11 #include "base/files/file_util.h" | 13 #include "base/files/file_util.h" |
12 #include "base/location.h" | 14 #include "base/location.h" |
13 #include "base/strings/string_number_conversions.h" | 15 #include "base/strings/string_number_conversions.h" |
14 #include "base/strings/string_split.h" | 16 #include "base/strings/string_split.h" |
15 #include "base/strings/string_util.h" | 17 #include "base/strings/string_util.h" |
16 #include "base/thread_task_runner_handle.h" | 18 #include "base/thread_task_runner_handle.h" |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 delegate_->OnUploadListAvailable(); | 121 delegate_->OnUploadListAvailable(); |
120 } | 122 } |
121 | 123 |
122 void UploadList::GetUploads(unsigned int max_count, | 124 void UploadList::GetUploads(unsigned int max_count, |
123 std::vector<UploadInfo>* uploads) { | 125 std::vector<UploadInfo>* uploads) { |
124 DCHECK(thread_checker_.CalledOnValidThread()); | 126 DCHECK(thread_checker_.CalledOnValidThread()); |
125 std::copy(uploads_.begin(), | 127 std::copy(uploads_.begin(), |
126 uploads_.begin() + std::min<size_t>(uploads_.size(), max_count), | 128 uploads_.begin() + std::min<size_t>(uploads_.size(), max_count), |
127 std::back_inserter(*uploads)); | 129 std::back_inserter(*uploads)); |
128 } | 130 } |
OLD | NEW |