OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_TEMPLATE_URL_MODEL_H__ | 5 #ifndef CHROME_BROWSER_TEMPLATE_URL_MODEL_H__ |
6 #define CHROME_BROWSER_TEMPLATE_URL_MODEL_H__ | 6 #define CHROME_BROWSER_TEMPLATE_URL_MODEL_H__ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 // Adds a new TemplateURL to this model. TemplateURLModel will own the | 116 // Adds a new TemplateURL to this model. TemplateURLModel will own the |
117 // reference, and delete it when the TemplateURL is removed. | 117 // reference, and delete it when the TemplateURL is removed. |
118 void Add(TemplateURL* template_url); | 118 void Add(TemplateURL* template_url); |
119 | 119 |
120 // Removes the keyword from the model. This deletes the supplied TemplateURL. | 120 // Removes the keyword from the model. This deletes the supplied TemplateURL. |
121 // This fails if the supplied template_url is the default search provider. | 121 // This fails if the supplied template_url is the default search provider. |
122 void Remove(const TemplateURL* template_url); | 122 void Remove(const TemplateURL* template_url); |
123 | 123 |
124 // Removes all auto-generated keywords that were created in the specified | 124 // Removes all auto-generated keywords that were created in the specified |
125 // range. | 125 // range. |
126 void RemoveAutoGeneratedBetween(base::Time created_after, base::Time created_b
efore); | 126 void RemoveAutoGeneratedBetween(base::Time created_after, |
| 127 base::Time created_before); |
127 | 128 |
128 // Replaces existing_turl with new_turl. new_turl is given the same ID as | 129 // Replaces existing_turl with new_turl. new_turl is given the same ID as |
129 // existing_turl. If existing_turl was the default, new_turl is made the | 130 // existing_turl. If existing_turl was the default, new_turl is made the |
130 // default. After this call existing_turl is deleted. As with Add, | 131 // default. After this call existing_turl is deleted. As with Add, |
131 // TemplateURLModel takes ownership of existing_turl. | 132 // TemplateURLModel takes ownership of existing_turl. |
132 void Replace(const TemplateURL* existing_turl, | 133 void Replace(const TemplateURL* existing_turl, |
133 TemplateURL* new_turl); | 134 TemplateURL* new_turl); |
134 | 135 |
135 // Removes all auto-generated keywords that were created on or after the | 136 // Removes all auto-generated keywords that were created on or after the |
136 // date passed in. | 137 // date passed in. |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 | 340 |
340 // ID assigned to next TemplateURL added to this model. This is an ever | 341 // ID assigned to next TemplateURL added to this model. This is an ever |
341 // increasing integer that is initialized from the database. | 342 // increasing integer that is initialized from the database. |
342 TemplateURL::IDType next_id_; | 343 TemplateURL::IDType next_id_; |
343 | 344 |
344 DISALLOW_EVIL_CONSTRUCTORS(TemplateURLModel); | 345 DISALLOW_EVIL_CONSTRUCTORS(TemplateURLModel); |
345 }; | 346 }; |
346 | 347 |
347 #endif // CHROME_BROWSER_TEMPLATE_URL_MODEL_H__ | 348 #endif // CHROME_BROWSER_TEMPLATE_URL_MODEL_H__ |
348 | 349 |
OLD | NEW |