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

Side by Side Diff: chrome/browser/ui/search_engines/template_url_table_model.h

Issue 2442953002: Remove stl_util's deletion function use from chrome/. (Closed)
Patch Set: fix Created 4 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_UI_SEARCH_ENGINES_TEMPLATE_URL_TABLE_MODEL_H_ 5 #ifndef CHROME_BROWSER_UI_SEARCH_ENGINES_TEMPLATE_URL_TABLE_MODEL_H_
6 #define CHROME_BROWSER_UI_SEARCH_ENGINES_TEMPLATE_URL_TABLE_MODEL_H_ 6 #define CHROME_BROWSER_UI_SEARCH_ENGINES_TEMPLATE_URL_TABLE_MODEL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 // Notification that a model entry has fetched its icon. 109 // Notification that a model entry has fetched its icon.
110 void FaviconAvailable(ModelEntry* entry); 110 void FaviconAvailable(ModelEntry* entry);
111 111
112 // TemplateURLServiceObserver notification. 112 // TemplateURLServiceObserver notification.
113 void OnTemplateURLServiceChanged() override; 113 void OnTemplateURLServiceChanged() override;
114 114
115 // Removes the entry at |index| from |entries_| and returns the removed item. 115 // Removes the entry at |index| from |entries_| and returns the removed item.
116 std::unique_ptr<ModelEntry> RemoveEntry(int index); 116 std::unique_ptr<ModelEntry> RemoveEntry(int index);
117 117
118 // Adds |entry| to |entries_| at |index| and takes ownership. 118 // Adds |entry| to |entries_| at |index|.
119 void AddEntry(int index, std::unique_ptr<ModelEntry> entry); 119 void AddEntry(int index, std::unique_ptr<ModelEntry> entry);
120 120
121 ui::TableModelObserver* observer_; 121 ui::TableModelObserver* observer_;
122 122
123 // The entries. 123 // The entries.
124 std::vector<ModelEntry*> entries_; 124 std::vector<std::unique_ptr<ModelEntry>> entries_;
125 125
126 // The model we're displaying entries from. 126 // The model we're displaying entries from.
127 TemplateURLService* template_url_service_; 127 TemplateURLService* template_url_service_;
128 128
129 favicon::FaviconService* favicon_service_; 129 favicon::FaviconService* favicon_service_;
130 130
131 // Index of the last search engine in entries_. This is used to determine the 131 // Index of the last search engine in entries_. This is used to determine the
132 // group boundaries. 132 // group boundaries.
133 int last_search_engine_index_; 133 int last_search_engine_index_;
134 134
135 // Index of the last other engine in entries_. This is used to determine the 135 // Index of the last other engine in entries_. This is used to determine the
136 // group boundaries. 136 // group boundaries.
137 int last_other_engine_index_; 137 int last_other_engine_index_;
138 138
139 DISALLOW_COPY_AND_ASSIGN(TemplateURLTableModel); 139 DISALLOW_COPY_AND_ASSIGN(TemplateURLTableModel);
140 }; 140 };
141 141
142 142
143 #endif // CHROME_BROWSER_UI_SEARCH_ENGINES_TEMPLATE_URL_TABLE_MODEL_H_ 143 #endif // CHROME_BROWSER_UI_SEARCH_ENGINES_TEMPLATE_URL_TABLE_MODEL_H_
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/safe_browsing_service.cc ('k') | chrome/browser/ui/search_engines/template_url_table_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698