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