Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: chrome/browser/search_engines/template_url_service.h

Issue 11446034: SupportsUserData and manifest handlers for Extension; use them for the Omnibox API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase + manifestdata Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/search_engines/template_url_service.h
diff --git a/chrome/browser/search_engines/template_url_service.h b/chrome/browser/search_engines/template_url_service.h
index 8dfcdb8f9e3d2d0dd78dc808cc3f244b06f641bc..084460ac463fa081306e328e6f9db18d601c9841 100644
--- a/chrome/browser/search_engines/template_url_service.h
+++ b/chrome/browser/search_engines/template_url_service.h
@@ -35,10 +35,6 @@ class SyncData;
class SyncErrorFactory;
}
-namespace extensions {
-class Extension;
-}
-
namespace history {
struct URLVisitedDetails;
}
@@ -176,20 +172,20 @@ class TemplateURLService : public WebDataServiceConsumer,
base::Time created_after,
base::Time created_before);
- // If the given extension has an omnibox keyword, adds a TemplateURL for that
- // keyword. Only 1 keyword is allowed for a given extension. If the keyword
+ // Adds a TemplateURL for an extension with an omnibox keyword.
+ // Only 1 keyword is allowed for a given extension. If a keyword
// already exists for this extension, does nothing.
- void RegisterExtensionKeyword(const extensions::Extension* extension);
+ void RegisterExtensionKeyword(const std::string& extension_id,
+ const std::string& extension_name,
+ const std::string& keyword);
- // Removes the TemplateURL containing the keyword for the given extension,
- // if any.
- void UnregisterExtensionKeyword(const extensions::Extension* extension);
+ // Removes the TemplateURL containing the keyword for the extension with the
+ // given ID, if any.
+ void UnregisterExtensionKeyword(const std::string& extension_id);
// Returns the TemplateURL associated with the keyword for this extension.
- // This works by checking the extension ID, not the keyword, so it will work
- // even if the user changed the keyword.
- TemplateURL* GetTemplateURLForExtension(
- const extensions::Extension* extension);
+ // This will work even if the user changed the keyword.
+ TemplateURL* GetTemplateURLForExtension(const std::string& extension_id);
// Returns the set of URLs describing the keywords. The elements are owned
// by TemplateURLService and should not be deleted.
@@ -363,7 +359,6 @@ class TemplateURLService : public WebDataServiceConsumer,
typedef std::map<string16, TemplateURL*> KeywordToTemplateMap;
typedef std::map<std::string, TemplateURL*> GUIDToTemplateMap;
- typedef std::list<std::string> PendingExtensionIDs;
// Declaration of values to be used in an enumerated histogram to tally
// changes to the default search provider from various entry points. In
@@ -640,9 +635,6 @@ class TemplateURLService : public WebDataServiceConsumer,
// increasing integer that is initialized from the database.
TemplateURLID next_id_;
- // List of extension IDs waiting for Load to have keywords registered.
- PendingExtensionIDs pending_extension_ids_;
-
// Function returning current time in base::Time units.
TimeProvider* time_provider_;
« no previous file with comments | « chrome/browser/profiles/profile_dependency_manager.cc ('k') | chrome/browser/search_engines/template_url_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698