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

Unified Diff: components/history/core/browser/visit_database.cc

Issue 1248613003: Issue 501916 : Add data type counts to profile deletion flow (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Third draft - removed all password manager code Created 5 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
Index: components/history/core/browser/visit_database.cc
diff --git a/components/history/core/browser/visit_database.cc b/components/history/core/browser/visit_database.cc
index 6d5819c36621ae11058b478811aaca64af2736e8..8506b60445740af68da33a69c9c70fe4d76aa29e 100644
--- a/components/history/core/browser/visit_database.cc
+++ b/components/history/core/browser/visit_database.cc
@@ -536,6 +536,25 @@ bool VisitDatabase::GetVisibleVisitCountToHost(const GURL& url,
return true;
}
+int VisitDatabase::GetCountOfURLsWithVisibleVisit() {
msramek 2015/07/29 13:55:01 In the Clear Browsing Data dialog, we decided to g
lwchkg 2015/07/29 14:46:05 I see. It means if "www.google.com" was visited in
+ sql::Statement statement(GetDB().GetCachedStatement(SQL_FROM_HERE,
+ "SELECT COUNT(*) FROM ("
+ "SELECT DISTINCT url FROM visits "
+ "WHERE (transition & ?) != 0 " // CHAIN_END
+ "AND (transition & ?) NOT IN (?, ?, ?)" // NO SUBFRAME or
+ // KEYWORD_GENERATED
+ ")"));
+
+ statement.BindInt(0, ui::PAGE_TRANSITION_CHAIN_END);
+ statement.BindInt(1, ui::PAGE_TRANSITION_CORE_MASK);
+ statement.BindInt(2, ui::PAGE_TRANSITION_AUTO_SUBFRAME);
+ statement.BindInt(3, ui::PAGE_TRANSITION_MANUAL_SUBFRAME);
+ statement.BindInt(4, ui::PAGE_TRANSITION_KEYWORD_GENERATED);
+
+ statement.Step();
+ return statement.ColumnInt(0);
+}
+
bool VisitDatabase::GetStartDate(base::Time* first_visit) {
sql::Statement statement(GetDB().GetCachedStatement(SQL_FROM_HERE,
"SELECT MIN(visit_time) FROM visits WHERE visit_time != 0"));

Powered by Google App Engine
This is Rietveld 408576698