1 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef COMPONENTS_HISTORY_CORE_BROWSER_KEYWORD_SEARCH_TERM_H_ 6 #define COMPONENTS_HISTORY_CORE_BROWSER_KEYWORD_SEARCH_TERM_H_ 7 8 #include "base/strings/string16.h" 9 #include "base/time/time.h" 10 #include "components/history/core/browser/keyword_id.h" 11 #include "components/history/core/browser/url_row.h" 12 13 namespace history { 14 15 // KeywordSearchTermVisit is returned from GetMostRecentKeywordSearchTerms. It 16 // gives the time and search term of the keyword visit. 17 struct KeywordSearchTermVisit { 18 KeywordSearchTermVisit(); 19 ~KeywordSearchTermVisit(); 20 21 base::string16 term; // The search term that was used. 22 int visits; // The visit count. 23 base::Time time; // The time of the most recent visit. 24 }; 25 26 // Used for URLs that have a search term associated with them. 27 struct KeywordSearchTermRow { 28 KeywordSearchTermRow(); 29 ~KeywordSearchTermRow(); 30 31 KeywordID keyword_id; // ID of the keyword. 32 URLID url_id; // ID of the url. 33 base::string16 term; // The search term that was used. 34 }; 35 36 } // namespace history 37 38 #endif // COMPONENTS_HISTORY_CORE_BROWSER_KEYWORD_SEARCH_TERM_H_ 39