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

Unified Diff: components/history/core/browser/keyword_search_term.h

Issue 339433007: Componentize URLDatabase (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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
« no previous file with comments | « components/history/DEPS ('k') | components/history/core/browser/keyword_search_term.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/history/core/browser/keyword_search_term.h
diff --git a/components/translate/core/common/language_detection_details.h b/components/history/core/browser/keyword_search_term.h
similarity index 19%
copy from components/translate/core/common/language_detection_details.h
copy to components/history/core/browser/keyword_search_term.h
index 6cc1a66c274075ede778550c99bc83ae40bed6cc..4630364ff58d7a3d0144f5881a2d635dd0abbd4d 100644
--- a/components/translate/core/common/language_detection_details.h
+++ b/components/history/core/browser/keyword_search_term.h
@@ -2,42 +2,37 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#ifndef COMPONENTS_TRANSLATE_CORE_COMMON_LANGUAGE_DETECTION_DETAILS_H_
-#define COMPONENTS_TRANSLATE_CORE_COMMON_LANGUAGE_DETECTION_DETAILS_H_
-
-#include <string>
+#ifndef COMPONENTS_HISTORY_CORE_BROWSER_KEYWORD_SEARCH_TERM_H_
+#define COMPONENTS_HISTORY_CORE_BROWSER_KEYWORD_SEARCH_TERM_H_
#include "base/strings/string16.h"
#include "base/time/time.h"
-#include "url/gurl.h"
-
-struct LanguageDetectionDetails {
- LanguageDetectionDetails();
- ~LanguageDetectionDetails();
-
- // The time when this was created.
- base::Time time;
-
- // The URL.
- GURL url;
+#include "components/history/core/browser/keyword_id.h"
+#include "components/history/core/browser/url_row.h"
- // The language detected by the content (Content-Language).
- std::string content_language;
+namespace history {
- // The language detected by CLD.
- std::string cld_language;
+// KeywordSearchTermVisit is returned from GetMostRecentKeywordSearchTerms. It
+// gives the time and search term of the keyword visit.
+struct KeywordSearchTermVisit {
+ KeywordSearchTermVisit();
+ ~KeywordSearchTermVisit();
- // Whether the CLD detection is reliable or not.
- bool is_cld_reliable;
-
- // The language written in the lang attribute of the html element.
- std::string html_root_language;
+ base::string16 term; // The search term that was used.
+ int visits; // The visit count.
+ base::Time time; // The time of the most recent visit.
+};
- // The adopted language.
- std::string adopted_language;
+// Used for URLs that have a search term associated with them.
+struct KeywordSearchTermRow {
+ KeywordSearchTermRow();
+ ~KeywordSearchTermRow();
- // The contents which is used for detection.
- base::string16 contents;
+ KeywordID keyword_id; // ID of the keyword.
+ URLID url_id; // ID of the url.
+ base::string16 term; // The search term that was used.
};
-#endif // COMPONENTS_TRANSLATE_CORE_COMMON_LANGUAGE_DETECTION_DETAILS_H_
+} // namespace history
+
+#endif // COMPONENTS_HISTORY_CORE_BROWSER_KEYWORD_SEARCH_TERM_H_
« no previous file with comments | « components/history/DEPS ('k') | components/history/core/browser/keyword_search_term.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698