| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ |
| 6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ | 6 #define CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 147 |
| 148 // Removes all auto-generated keywords that were created in the specified | 148 // Removes all auto-generated keywords that were created in the specified |
| 149 // range. | 149 // range. |
| 150 void RemoveAutoGeneratedBetween(base::Time created_after, | 150 void RemoveAutoGeneratedBetween(base::Time created_after, |
| 151 base::Time created_before); | 151 base::Time created_before); |
| 152 | 152 |
| 153 // Removes all auto-generated keywords that were created on or after the | 153 // Removes all auto-generated keywords that were created on or after the |
| 154 // date passed in. | 154 // date passed in. |
| 155 void RemoveAutoGeneratedSince(base::Time created_after); | 155 void RemoveAutoGeneratedSince(base::Time created_after); |
| 156 | 156 |
| 157 // Removes all auto-generated keywords that were created in the specified |
| 158 // range for a specified |origin|. If |origin| is empty, deletes all |
| 159 // auto-generated keywords in the range. |
| 160 void RemoveAutoGeneratedForOriginBetween(base::Time created_after, |
| 161 base::Time created_before, |
| 162 const GURL& origin); |
| 163 |
| 157 // If the given extension has an omnibox keyword, adds a TemplateURL for that | 164 // If the given extension has an omnibox keyword, adds a TemplateURL for that |
| 158 // keyword. Only 1 keyword is allowed for a given extension. If the keyword | 165 // keyword. Only 1 keyword is allowed for a given extension. If the keyword |
| 159 // already exists for this extension, does nothing. | 166 // already exists for this extension, does nothing. |
| 160 void RegisterExtensionKeyword(const Extension* extension); | 167 void RegisterExtensionKeyword(const Extension* extension); |
| 161 | 168 |
| 162 // Removes the TemplateURL containing the keyword for the given extension, | 169 // Removes the TemplateURL containing the keyword for the given extension, |
| 163 // if any. | 170 // if any. |
| 164 void UnregisterExtensionKeyword(const Extension* extension); | 171 void UnregisterExtensionKeyword(const Extension* extension); |
| 165 | 172 |
| 166 // Returns the TemplateURL associated with the keyword for this extension. | 173 // Returns the TemplateURL associated with the keyword for this extension. |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 // from Sync. This is to facilitate the fact that changes to the value of | 589 // from Sync. This is to facilitate the fact that changes to the value of |
| 583 // prefs::kSyncedDefaultSearchProviderGUID do not always come before the | 590 // prefs::kSyncedDefaultSearchProviderGUID do not always come before the |
| 584 // TemplateURL entry it refers to, and to handle the case when we want to use | 591 // TemplateURL entry it refers to, and to handle the case when we want to use |
| 585 // the Synced default when the default search provider becomes unmanaged. | 592 // the Synced default when the default search provider becomes unmanaged. |
| 586 bool pending_synced_default_search_; | 593 bool pending_synced_default_search_; |
| 587 | 594 |
| 588 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); | 595 DISALLOW_COPY_AND_ASSIGN(TemplateURLService); |
| 589 }; | 596 }; |
| 590 | 597 |
| 591 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ | 598 #endif // CHROME_BROWSER_SEARCH_ENGINES_TEMPLATE_URL_SERVICE_H_ |
| OLD | NEW |