diff options
author | Lev Dragunov <l.dragunov@corp.mail.ru> | 2015-08-31 17:48:17 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 03:03:10 +0300 |
commit | f8d2eb24e7ac104e805d5ef94bbe8129a48bc8df (patch) | |
tree | 943d5b778afa9d0c84f38c13ad6ce453ae1d9a97 /search/query_saver.hpp | |
parent | 3f50364b7ef9aabbe4d06aa68462d75ce34809b2 (diff) |
[search] Save search query with it's locale.
Diffstat (limited to 'search/query_saver.hpp')
-rw-r--r-- | search/query_saver.hpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/search/query_saver.hpp b/search/query_saver.hpp index fb7a2c7259..1d677309c5 100644 --- a/search/query_saver.hpp +++ b/search/query_saver.hpp @@ -1,6 +1,7 @@ #include "std/list.hpp" #include "std/string.hpp" #include "std/vector.hpp" +#include "std/utility.hpp" namespace search { @@ -8,11 +9,13 @@ namespace search class QuerySaver { public: + /// Search request <locale, request>. + using TSearchRequest = pair<string, string>; QuerySaver(); - void Add(string const & query); + void Add(TSearchRequest const & query); /// Returns several last saved queries from newest to oldest query. /// @see kMaxSuggestCount in implementation file. - list<string> const & Get() const { return m_topQueries; } + list<TSearchRequest> const & Get() const { return m_topQueries; } /// Clear last queries storage. All data will be lost. void Clear(); @@ -25,6 +28,6 @@ private: void Save(); void Load(); - list<string> m_topQueries; + list<TSearchRequest> m_topQueries; }; } // namespace search |