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 COMPONENTS_SEARCH_ENGINES_KEYWORD_WEB_DATA_SERVICE_H__ | 5 #ifndef COMPONENTS_SEARCH_ENGINES_KEYWORD_WEB_DATA_SERVICE_H__ |
6 #define COMPONENTS_SEARCH_ENGINES_KEYWORD_WEB_DATA_SERVICE_H__ | 6 #define COMPONENTS_SEARCH_ENGINES_KEYWORD_WEB_DATA_SERVICE_H__ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 #include <stdint.h> |
| 10 |
| 11 #include "base/macros.h" |
8 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
9 #include "components/search_engines/keyword_table.h" | 13 #include "components/search_engines/keyword_table.h" |
10 #include "components/search_engines/template_url_id.h" | 14 #include "components/search_engines/template_url_id.h" |
11 #include "components/webdata/common/web_data_service_base.h" | 15 #include "components/webdata/common/web_data_service_base.h" |
12 #include "components/webdata/common/web_database.h" | 16 #include "components/webdata/common/web_database.h" |
13 | 17 |
14 namespace base { | 18 namespace base { |
15 class SingleThreadTaskRunner; | 19 class SingleThreadTaskRunner; |
16 } | 20 } |
17 | 21 |
18 class WDTypedResult; | 22 class WDTypedResult; |
19 class WebDatabaseService; | 23 class WebDatabaseService; |
20 struct TemplateURLData; | 24 struct TemplateURLData; |
21 | 25 |
22 struct WDKeywordsResult { | 26 struct WDKeywordsResult { |
23 WDKeywordsResult(); | 27 WDKeywordsResult(); |
24 ~WDKeywordsResult(); | 28 ~WDKeywordsResult(); |
25 | 29 |
26 KeywordTable::Keywords keywords; | 30 KeywordTable::Keywords keywords; |
27 // Identifies the ID of the TemplateURL that is the default search. A value of | 31 // Identifies the ID of the TemplateURL that is the default search. A value of |
28 // 0 indicates there is no default search provider. | 32 // 0 indicates there is no default search provider. |
29 int64 default_search_provider_id; | 33 int64_t default_search_provider_id; |
30 // Version of the built-in keywords. A value of 0 indicates a first run. | 34 // Version of the built-in keywords. A value of 0 indicates a first run. |
31 int builtin_keyword_version; | 35 int builtin_keyword_version; |
32 }; | 36 }; |
33 | 37 |
34 class WebDataServiceConsumer; | 38 class WebDataServiceConsumer; |
35 | 39 |
36 class KeywordWebDataService : public WebDataServiceBase { | 40 class KeywordWebDataService : public WebDataServiceBase { |
37 public: | 41 public: |
38 // Instantiate this to turn on batch mode on the provided |service| | 42 // Instantiate this to turn on batch mode on the provided |service| |
39 // until the scoper is destroyed. When batch mode is on, calls to any of the | 43 // until the scoper is destroyed. When batch mode is on, calls to any of the |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 WebDatabase* db); | 105 WebDatabase* db); |
102 WebDatabase::State SetBuiltinKeywordVersionImpl(int version, WebDatabase* db); | 106 WebDatabase::State SetBuiltinKeywordVersionImpl(int version, WebDatabase* db); |
103 | 107 |
104 size_t batch_mode_level_; | 108 size_t batch_mode_level_; |
105 KeywordTable::Operations queued_keyword_operations_; | 109 KeywordTable::Operations queued_keyword_operations_; |
106 | 110 |
107 DISALLOW_COPY_AND_ASSIGN(KeywordWebDataService); | 111 DISALLOW_COPY_AND_ASSIGN(KeywordWebDataService); |
108 }; | 112 }; |
109 | 113 |
110 #endif // COMPONENTS_SEARCH_ENGINES_KEYWORD_WEB_DATA_SERVICE_H__ | 114 #endif // COMPONENTS_SEARCH_ENGINES_KEYWORD_WEB_DATA_SERVICE_H__ |
OLD | NEW |