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

Unified Diff: chrome/utility/importer/ie_importer_win.cc

Issue 800433002: Search for history items that was imported from IE is not working. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactored testing code. Created 6 years 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/utility/importer/ie_importer_win.cc
diff --git a/chrome/utility/importer/ie_importer_win.cc b/chrome/utility/importer/ie_importer_win.cc
index 4865397260acaac1ecee67f5f757ed012bcac32a..f538bcafc1f9c83537c6a0029007210e5865c75f 100644
--- a/chrome/utility/importer/ie_importer_win.cc
+++ b/chrome/utility/importer/ie_importer_win.cc
@@ -487,6 +487,9 @@ void IEImporter::ImportHistory() {
std::vector<ImporterURLRow> rows;
STATURL stat_url;
ULONG fetched;
+
+ // Fill STATURL::dwFlags attribute for top-level items.
+ enum_url->SetFilter(NULL, STATURL_QUERYFLAG_TOPLEVEL);
gab 2014/12/11 16:29:49 Gosh this API is confusing..! So you need to set
Alexey Seren 2014/12/12 10:07:08 By passing NULL here I've missed an OPTIONAL poszF
gab 2014/12/12 14:58:31 Right, but in this case poszFilter is documented a
Alexey Seren 2014/12/15 14:00:23 Basing on documentation SetFilter() can be used to
gab 2014/12/15 15:50:01 I see, hadn't realized filling those was off by de
Alexey Seren 2014/12/17 11:45:45 Acknowledged.
while (!cancelled() &&
(result = enum_url->Next(1, &stat_url, &fetched)) == S_OK) {
gab 2014/12/11 16:29:49 Looks like |fetched| is an optional parameter [1]
Alexey Seren 2014/12/12 10:07:08 Acknowledged.
base::string16 url_string;
@@ -510,7 +513,7 @@ void IEImporter::ImportHistory() {
ImporterURLRow row(url);
row.title = title_string;
row.last_visit = base::Time::FromFileTime(stat_url.ftLastVisited);
- if (stat_url.dwFlags == STATURL_QUERYFLAG_TOPLEVEL) {
+ if (stat_url.dwFlags & STATURLFLAG_ISTOPLEVEL) {
gab 2014/12/11 16:29:49 As you mentioned in the CL description, the defini
Alexey Seren 2014/12/12 10:07:08 No we cannot do equality comparing here because fl
gab 2014/12/12 14:58:31 I see, so the "either or" documentation for dwFlag
row.visit_count = 1;
row.hidden = false;
} else {

Powered by Google App Engine
This is Rietveld 408576698