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

Unified Diff: chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc

Issue 2843056: Fix memory leak in unit test... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc
===================================================================
--- chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc (revision 52241)
+++ chrome/browser/search_engines/template_url_prepopulate_data_unittest.cc (working copy)
@@ -67,9 +67,9 @@
for (size_t i = 0; i < arraysize(ids); ++i) {
profile.GetPrefs()->SetInteger(prefs::kCountryIDAtInstall, ids[i]);
ScopedVector<TemplateURL> urls;
- size_t url_count;
+ size_t default_index;
TemplateURLPrepopulateData::GetPrepopulatedEngines(
- profile.GetPrefs(), &(urls.get()), &url_count);
+ profile.GetPrefs(), &(urls.get()), &default_index);
std::set<int> unique_ids;
for (size_t turl_i = 0; turl_i < urls.size(); ++turl_i) {
ASSERT_TRUE(unique_ids.find(urls[turl_i]->prepopulate_id()) ==
@@ -112,10 +112,10 @@
int version = TemplateURLPrepopulateData::GetDataVersion(prefs.get());
EXPECT_EQ(1, version);
- std::vector<TemplateURL*> t_urls;
+ ScopedVector<TemplateURL> t_urls;
size_t default_index;
TemplateURLPrepopulateData::GetPrepopulatedEngines(
- prefs.get(), &t_urls, &default_index);
+ prefs.get(), &(t_urls.get()), &default_index);
ASSERT_EQ(1u, t_urls.size());
EXPECT_EQ(L"foo", t_urls[0]->short_name());
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698