Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(471)

Side by Side Diff: ui/app_list/search/history_data.cc

Issue 1539583003: Convert Pass()→std::move() in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/app_list/search/history.cc ('k') | ui/app_list/search/history_data_store.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "ui/app_list/search/history_data.h" 5 #include "ui/app_list/search/history_data.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 ++secondary_it) { 122 ++secondary_it) {
123 const std::string& secondary_result_id = (*secondary_it); 123 const std::string& secondary_result_id = (*secondary_it);
124 124
125 // Secondary match only gets added if there there is no primary match. 125 // Secondary match only gets added if there there is no primary match.
126 if (results->find(secondary_result_id) != results->end()) 126 if (results->find(secondary_result_id) != results->end())
127 continue; 127 continue;
128 (*results)[secondary_result_id] = secondary_type; 128 (*results)[secondary_result_id] = secondary_type;
129 } 129 }
130 } 130 }
131 131
132 return results.Pass(); 132 return results;
133 } 133 }
134 134
135 void HistoryData::AddObserver(HistoryDataObserver* observer) { 135 void HistoryData::AddObserver(HistoryDataObserver* observer) {
136 observers_.AddObserver(observer); 136 observers_.AddObserver(observer);
137 } 137 }
138 138
139 void HistoryData::RemoveObserver(HistoryDataObserver* observer) { 139 void HistoryData::RemoveObserver(HistoryDataObserver* observer) {
140 observers_.RemoveObserver(observer); 140 observers_.RemoveObserver(observer);
141 } 141 }
142 142
(...skipping 23 matching lines...) Expand all
166 &EntrySortByTimeAscending); 166 &EntrySortByTimeAscending);
167 167
168 for (size_t i = 0; i < entries_to_remove; ++i) { 168 for (size_t i = 0; i < entries_to_remove; ++i) {
169 const std::string& query = *entries[i].query; 169 const std::string& query = *entries[i].query;
170 store_->Delete(query); 170 store_->Delete(query);
171 associations_.erase(query); 171 associations_.erase(query);
172 } 172 }
173 } 173 }
174 174
175 } // namespace app_list 175 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/search/history.cc ('k') | ui/app_list/search/history_data_store.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698