Lines Matching refs:sources_
283 return sources_.size();
288 return sources_[index];
305 for (size_t i = 0; i < sources_.size(); ++i) {
306 if (new_source_set.find(sources_[i].id) == new_source_set.end()) {
307 sources_.erase(sources_.begin() + i);
313 if (new_sources.size() > sources_.size()) {
315 for (size_t i = 0; i < sources_.size(); ++i) {
316 old_source_set.insert(sources_[i].id);
321 sources_.insert(sources_.begin() + i, Source());
322 sources_[i].id = new_sources[i].id;
323 sources_[i].name = new_sources[i].name;
328 DCHECK_EQ(new_sources.size(), sources_.size());
332 while (pos < sources_.size()) {
333 if (!(sources_[pos].id == new_sources[pos].id)) {
335 // of |sources_|, because entries before |pos| should have been sorted.
337 for (; old_pos < sources_.size(); ++old_pos) {
338 if (sources_[old_pos].id == new_sources[pos].id)
341 DCHECK(sources_[old_pos].id == new_sources[pos].id);
344 Source temp = sources_[old_pos];
345 sources_.erase(sources_.begin() + old_pos);
346 sources_.insert(sources_.begin() + pos, temp);
351 if (sources_[pos].name != new_sources[pos].name) {
352 sources_[pos].name = new_sources[pos].name;
362 DCHECK_LT(index, static_cast<int>(sources_.size()));
363 sources_[index].thumbnail = image;