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

Unified Diff: chrome/browser/search_engines/util.h

Issue 10409002: Make prepopulated-TemplateURL-de-duper heuristic smarter. Instead of blindly preserving the first U… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Steve's initial changes + tests Created 8 years, 7 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/search_engines/util.h
diff --git a/chrome/browser/search_engines/util.h b/chrome/browser/search_engines/util.h
index 31b8fb2ab922bf321d701621d5ebb9c57aaad87f..aa4970e652393423c30fe208422429624baca028 100644
--- a/chrome/browser/search_engines/util.h
+++ b/chrome/browser/search_engines/util.h
@@ -11,6 +11,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/string16.h"
+#include "chrome/browser/search_engines/template_url_service.h"
class Profile;
class TemplateURL;
@@ -36,7 +37,7 @@ void GetSearchProvidersUsingKeywordResult(
const WDTypedResult& result,
WebDataService* service,
Profile* profile,
- std::vector<TemplateURL*>* template_urls,
+ TemplateURLService::TemplateURLVector* template_urls,
TemplateURL** default_search_provider,
int* new_resource_keyword_version);
@@ -49,4 +50,15 @@ bool DidDefaultSearchProviderChange(
Profile* profile,
scoped_ptr<TemplateURL>* backup_default_search_provider);
+namespace testing {
+
+// Expose and document for testing.
+void TestRemoveDuplicatePrepopulateIDs(
+ WebDataService* service,
+ const std::vector<TemplateURL*>& prepopulated_urls,
+ TemplateURL* default_search_provider,
+ TemplateURLService::TemplateURLVector* template_urls);
SteveT 2012/05/17 13:34:54 I'm exposing RemoveDuplicatePrepopulateIDs for dir
Peter Kasting 2012/05/17 20:12:17 Seems like at this point we might as well just dec
SteveT 2012/05/17 21:27:22 Okay that's fair. Done.
+
+} // namespace testing
+
#endif // CHROME_BROWSER_SEARCH_ENGINES_UTIL_H_

Powered by Google App Engine
This is Rietveld 408576698