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

Unified Diff: chrome/browser/importer/firefox_importer_browsertest.cc

Issue 2305813002: Remove ScopedVector from importer. (Closed)
Patch Set: pkasting Created 4 years, 3 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 | chrome/browser/importer/ie_importer_browsertest_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/importer/firefox_importer_browsertest.cc
diff --git a/chrome/browser/importer/firefox_importer_browsertest.cc b/chrome/browser/importer/firefox_importer_browsertest.cc
index 874498c92df530f08e413c17f23067ef6bda554d..b81ed67aa1def40f8b63f5d5f3a79b0845dc665f 100644
--- a/chrome/browser/importer/firefox_importer_browsertest.cc
+++ b/chrome/browser/importer/firefox_importer_browsertest.cc
@@ -218,20 +218,19 @@ class FirefoxObserver : public ProfileWriter,
}
}
- void AddKeywords(ScopedVector<TemplateURL> template_urls,
+ void AddKeywords(TemplateURLService::OwnedTemplateURLVector template_urls,
bool unique_on_host_and_path) override {
- for (size_t i = 0; i < template_urls.size(); ++i) {
+ for (const auto& turl : template_urls) {
// The order might not be deterministic, look in the expected list for
// that template URL.
bool found = false;
- const base::string16& imported_keyword = template_urls[i]->keyword();
- for (size_t j = 0; j < arraysize(kFirefoxKeywords); ++j) {
- const base::string16 expected_keyword = base::WideToUTF16(
- use_keyword_in_json_ ?
- kFirefoxKeywords[j].keyword_in_json :
- kFirefoxKeywords[j].keyword_in_sqlite);
+ const base::string16& imported_keyword = turl->keyword();
+ for (const auto& keyword : kFirefoxKeywords) {
+ const base::string16 expected_keyword =
+ base::WideToUTF16(use_keyword_in_json_ ? keyword.keyword_in_json
+ : keyword.keyword_in_sqlite);
if (imported_keyword == expected_keyword) {
- EXPECT_EQ(kFirefoxKeywords[j].url, template_urls[i]->url());
+ EXPECT_EQ(keyword.url, turl->url());
found = true;
break;
}
« no previous file with comments | « no previous file | chrome/browser/importer/ie_importer_browsertest_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698