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

Side by Side Diff: chrome/browser/search_engines/template_url_model.h

Issue 339071: If we remove a search engine from our prepopulate data, remove it from the us... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/search_engines/template_url_model.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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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_TEMPLATE_URL_MODEL_H__ 5 #ifndef CHROME_BROWSER_TEMPLATE_URL_MODEL_H__
6 #define CHROME_BROWSER_TEMPLATE_URL_MODEL_H__ 6 #define CHROME_BROWSER_TEMPLATE_URL_MODEL_H__
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // This exists and is virtual for testing. 205 // This exists and is virtual for testing.
206 virtual void SetKeywordSearchTermsForURL(const TemplateURL* t_url, 206 virtual void SetKeywordSearchTermsForURL(const TemplateURL* t_url,
207 const GURL& url, 207 const GURL& url,
208 const std::wstring& term); 208 const std::wstring& term);
209 209
210 private: 210 private:
211 FRIEND_TEST(TemplateURLModelTest, BuildQueryTerms); 211 FRIEND_TEST(TemplateURLModelTest, BuildQueryTerms);
212 FRIEND_TEST(TemplateURLModelTest, UpdateKeywordSearchTermsForURL); 212 FRIEND_TEST(TemplateURLModelTest, UpdateKeywordSearchTermsForURL);
213 FRIEND_TEST(TemplateURLModelTest, DontUpdateKeywordSearchForNonReplaceable); 213 FRIEND_TEST(TemplateURLModelTest, DontUpdateKeywordSearchForNonReplaceable);
214 FRIEND_TEST(TemplateURLModelTest, ChangeGoogleBaseValue); 214 FRIEND_TEST(TemplateURLModelTest, ChangeGoogleBaseValue);
215 FRIEND_TEST(TemplateURLModelTest, MergeDeletesUnusedProviders);
215 friend class TemplateURLModelTest; 216 friend class TemplateURLModelTest;
216 217
217 typedef std::map<std::wstring, const TemplateURL*> KeywordToTemplateMap; 218 typedef std::map<std::wstring, const TemplateURL*> KeywordToTemplateMap;
218 typedef std::vector<const TemplateURL*> TemplateURLVector; 219 typedef std::vector<const TemplateURL*> TemplateURLVector;
219 typedef std::set<const TemplateURL*> TemplateURLSet; 220 typedef std::set<const TemplateURL*> TemplateURLSet;
220 typedef std::map<std::string, TemplateURLSet> HostToURLsMap; 221 typedef std::map<std::string, TemplateURLSet> HostToURLsMap;
221 222
222 // Helper functor for FindMatchingKeywords(), for finding the range of 223 // Helper functor for FindMatchingKeywords(), for finding the range of
223 // keywords which begin with a prefix. 224 // keywords which begin with a prefix.
224 class LessWithPrefix; 225 class LessWithPrefix;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 scoped_ptr<TemplateURL> prefs_default_search_provider_; 345 scoped_ptr<TemplateURL> prefs_default_search_provider_;
345 346
346 // ID assigned to next TemplateURL added to this model. This is an ever 347 // ID assigned to next TemplateURL added to this model. This is an ever
347 // increasing integer that is initialized from the database. 348 // increasing integer that is initialized from the database.
348 TemplateURL::IDType next_id_; 349 TemplateURL::IDType next_id_;
349 350
350 DISALLOW_EVIL_CONSTRUCTORS(TemplateURLModel); 351 DISALLOW_EVIL_CONSTRUCTORS(TemplateURLModel);
351 }; 352 };
352 353
353 #endif // CHROME_BROWSER_TEMPLATE_URL_MODEL_H__ 354 #endif // CHROME_BROWSER_TEMPLATE_URL_MODEL_H__
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/search_engines/template_url_model.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698