OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 CHROME_BROWSER_AUTOCOMPLETE_ANSWERS_CACHE_H_ | 5 #ifndef COMPONENTS_OMNIBOX_ANSWERS_CACHE_H_ |
6 #define CHROME_BROWSER_AUTOCOMPLETE_ANSWERS_CACHE_H_ | 6 #define COMPONENTS_OMNIBOX_ANSWERS_CACHE_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/strings/string16.h" | 11 #include "base/strings/string16.h" |
12 | 12 |
13 struct AnswersQueryData { | 13 struct AnswersQueryData { |
14 AnswersQueryData(); | 14 AnswersQueryData(); |
15 AnswersQueryData(const base::string16& full_query_text, | 15 AnswersQueryData(const base::string16& full_query_text, |
16 const base::string16& query_type); | 16 const base::string16& query_type); |
(...skipping 19 matching lines...) Expand all Loading... |
36 bool empty() const { return cache_.empty(); } | 36 bool empty() const { return cache_.empty(); } |
37 | 37 |
38 private: | 38 private: |
39 size_t max_entries_; | 39 size_t max_entries_; |
40 typedef std::list<AnswersQueryData> Cache; | 40 typedef std::list<AnswersQueryData> Cache; |
41 Cache cache_; | 41 Cache cache_; |
42 | 42 |
43 DISALLOW_COPY_AND_ASSIGN(AnswersCache); | 43 DISALLOW_COPY_AND_ASSIGN(AnswersCache); |
44 }; | 44 }; |
45 | 45 |
46 #endif // CHROME_BROWSER_AUTOCOMPLETE_ANSWERS_CACHE_H_ | 46 #endif // COMPONENTS_OMNIBOX_ANSWERS_CACHE_H_ |
OLD | NEW |