Lines Matching refs:sources_
76 return sources_.size();
81 return sources_[index];
94 for (size_t i = 0; i < sources_.size(); ++i) {
95 if (new_source_set.find(sources_[i].id) == new_source_set.end()) {
96 sources_.erase(sources_.begin() + i);
102 if (new_sources.size() > sources_.size()) {
104 for (size_t i = 0; i < sources_.size(); ++i) {
105 old_source_set.insert(sources_[i].id);
110 sources_.insert(sources_.begin() + i, Source());
111 sources_[i].id = new_sources[i].id;
112 sources_[i].name = new_sources[i].name;
117 DCHECK_EQ(new_sources.size(), sources_.size());
121 while (pos < sources_.size()) {
122 if (!(sources_[pos].id == new_sources[pos].id)) {
124 // of |sources_|, because entries before |pos| should have been sorted.
126 for (; old_pos < sources_.size(); ++old_pos) {
127 if (sources_[old_pos].id == new_sources[pos].id)
130 DCHECK(sources_[old_pos].id == new_sources[pos].id);
133 Source temp = sources_[old_pos];
134 sources_.erase(sources_.begin() + old_pos);
135 sources_.insert(sources_.begin() + pos, temp);
140 if (sources_[pos].name != new_sources[pos].name) {
141 sources_[pos].name = new_sources[pos].name;
233 for (size_t i = 0; i < sources_.size(); ++i) {
234 if (sources_[i].id == id) {
235 sources_[i].thumbnail = image.AsImageSkia();