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

Side by Side Diff: components/history/core/browser/visit_database.h

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: First draft 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_VISIT_DATABASE_H_ 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_VISIT_DATABASE_H_
6 #define COMPONENTS_HISTORY_CORE_BROWSER_VISIT_DATABASE_H_ 6 #define COMPONENTS_HISTORY_CORE_BROWSER_VISIT_DATABASE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "components/history/core/browser/history_types.h" 10 #include "components/history/core/browser/history_types.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // Gets the number of user-visible visits to all URLs on the same 171 // Gets the number of user-visible visits to all URLs on the same
172 // scheme/host/port as |url|, as well as the time of the earliest visit. 172 // scheme/host/port as |url|, as well as the time of the earliest visit.
173 // "User-visible" is defined as in GetVisibleVisitsInRange() above, i.e. 173 // "User-visible" is defined as in GetVisibleVisitsInRange() above, i.e.
174 // excluding redirects and subframes. 174 // excluding redirects and subframes.
175 // This function is only valid for HTTP and HTTPS URLs; all other schemes 175 // This function is only valid for HTTP and HTTPS URLs; all other schemes
176 // cause the function to return false. 176 // cause the function to return false.
177 bool GetVisibleVisitCountToHost(const GURL& url, 177 bool GetVisibleVisitCountToHost(const GURL& url,
178 int* count, 178 int* count,
179 base::Time* first_visit); 179 base::Time* first_visit);
180 180
181 // Gets the number of URLs with user-visible visits.
182 // "User-visible" is defined as in GetVisibleVisitsInRange() above, i.e.
183 // excluding redirects and subframes.
184 int GetCountOfURLsWithVisibleVisit();
185
181 // Get the time of the first item in our database. 186 // Get the time of the first item in our database.
182 bool GetStartDate(base::Time* first_visit); 187 bool GetStartDate(base::Time* first_visit);
183 188
184 // Get the source information about the given visits. 189 // Get the source information about the given visits.
185 void GetVisitsSource(const VisitVector& visits, 190 void GetVisitsSource(const VisitVector& visits,
186 VisitSourceMap* sources); 191 VisitSourceMap* sources);
187 192
188 protected: 193 protected:
189 // Returns the database for the functions in this interface. 194 // Returns the database for the functions in this interface.
190 virtual sql::Connection& GetDB() = 0; 195 virtual sql::Connection& GetDB() = 0;
(...skipping 27 matching lines...) Expand all
218 DISALLOW_COPY_AND_ASSIGN(VisitDatabase); 223 DISALLOW_COPY_AND_ASSIGN(VisitDatabase);
219 }; 224 };
220 225
221 // Rows, in order, of the visit table. 226 // Rows, in order, of the visit table.
222 #define HISTORY_VISIT_ROW_FIELDS \ 227 #define HISTORY_VISIT_ROW_FIELDS \
223 " id,url,visit_time,from_visit,transition,segment_id,visit_duration " 228 " id,url,visit_time,from_visit,transition,segment_id,visit_duration "
224 229
225 } // namespace history 230 } // namespace history
226 231
227 #endif // COMPONENTS_HISTORY_CORE_BROWSER_VISIT_DATABASE_H_ 232 #endif // COMPONENTS_HISTORY_CORE_BROWSER_VISIT_DATABASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698