| OLD | NEW |
| 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_HISTORY_BACKEND_H_ | 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_ |
| 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_ | 6 #define COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 // Returns a redirect chain in |redirects| for the VisitID | 599 // Returns a redirect chain in |redirects| for the VisitID |
| 600 // |cur_visit|. |cur_visit| is assumed to be valid. Assumes that | 600 // |cur_visit|. |cur_visit| is assumed to be valid. Assumes that |
| 601 // this HistoryBackend object has been Init()ed successfully. | 601 // this HistoryBackend object has been Init()ed successfully. |
| 602 void GetRedirectsFromSpecificVisit(VisitID cur_visit, | 602 void GetRedirectsFromSpecificVisit(VisitID cur_visit, |
| 603 RedirectList* redirects); | 603 RedirectList* redirects); |
| 604 | 604 |
| 605 // Similar to the above function except returns a redirect list ending | 605 // Similar to the above function except returns a redirect list ending |
| 606 // at |cur_visit|. | 606 // at |cur_visit|. |
| 607 void GetRedirectsToSpecificVisit(VisitID cur_visit, RedirectList* redirects); | 607 void GetRedirectsToSpecificVisit(VisitID cur_visit, RedirectList* redirects); |
| 608 | 608 |
| 609 // Update the visit_duration information in visits table. | 609 // Updates the visit_duration information in visits table. |
| 610 void UpdateVisitDuration(VisitID visit_id, const base::Time end_ts); | 610 void UpdateVisitDuration(VisitID visit_id, const base::Time end_ts); |
| 611 | 611 |
| 612 // Returns whether |url| is on an untyped intranet host. |
| 613 bool IsUntypedIntranetHost(const GURL& url); |
| 614 |
| 612 // Querying ------------------------------------------------------------------ | 615 // Querying ------------------------------------------------------------------ |
| 613 | 616 |
| 614 // Backends for QueryHistory. *Basic() handles queries that are not | 617 // Backends for QueryHistory. *Basic() handles queries that are not |
| 615 // text search queries and can just be given directly to the history DB. | 618 // text search queries and can just be given directly to the history DB. |
| 616 // The *Text() version performs a brute force query of the history DB to | 619 // The *Text() version performs a brute force query of the history DB to |
| 617 // search for results which match the given text query. | 620 // search for results which match the given text query. |
| 618 // Both functions assume QueryHistory already checked the DB for validity. | 621 // Both functions assume QueryHistory already checked the DB for validity. |
| 619 void QueryHistoryBasic(const QueryOptions& options, QueryResults* result); | 622 void QueryHistoryBasic(const QueryOptions& options, QueryResults* result); |
| 620 void QueryHistoryText(const base::string16& text_query, | 623 void QueryHistoryText(const base::string16& text_query, |
| 621 const QueryOptions& options, | 624 const QueryOptions& options, |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 890 // Init is called. Defined after observers_ because it unregisters itself as | 893 // Init is called. Defined after observers_ because it unregisters itself as |
| 891 // observer during destruction. | 894 // observer during destruction. |
| 892 std::unique_ptr<TypedUrlSyncableService> typed_url_syncable_service_; | 895 std::unique_ptr<TypedUrlSyncableService> typed_url_syncable_service_; |
| 893 | 896 |
| 894 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); | 897 DISALLOW_COPY_AND_ASSIGN(HistoryBackend); |
| 895 }; | 898 }; |
| 896 | 899 |
| 897 } // namespace history | 900 } // namespace history |
| 898 | 901 |
| 899 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_ | 902 #endif // COMPONENTS_HISTORY_CORE_BROWSER_HISTORY_BACKEND_H_ |
| OLD | NEW |