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

Unified Diff: chrome/common/extensions/extension_set.h

Issue 8827013: Move/replace/rename URL-based extension getters from ExtensionService to/in ExtensionSet. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: id Created 9 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
« no previous file with comments | « chrome/common/extensions/extension_messages.h ('k') | chrome/common/extensions/extension_set.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension_set.h
diff --git a/chrome/common/extensions/extension_set.h b/chrome/common/extensions/extension_set.h
index 340755705c3e54b64069ef46b97c5e579e8bede7..87edae127410b9cc4e987b300161c0de5893a08b 100644
--- a/chrome/common/extensions/extension_set.h
+++ b/chrome/common/extensions/extension_set.h
@@ -93,14 +93,22 @@ class ExtensionSet {
// Returns the extension ID, or empty if none. This includes web URLs that
// are part of an extension's web extent.
- std::string GetIDByURL(const ExtensionURLInfo& info) const;
+ std::string GetExtensionOrAppIDByURL(const ExtensionURLInfo& info) const;
// Returns the Extension, or NULL if none. This includes web URLs that are
// part of an extension's web extent.
// NOTE: This can return NULL if called before UpdateExtensions receives
// bulk extension data (e.g. if called from
// EventBindings::HandleContextCreated)
- const Extension* GetByURL(const ExtensionURLInfo& info) const;
+ const Extension* GetExtensionOrAppByURL(const ExtensionURLInfo& info) const;
+
+ // Returns the hosted app whose web extent contains the URL.
+ const Extension* GetHostedAppByURL(const ExtensionURLInfo& info) const;
+
+ // Returns a hosted app that contains any URL that overlaps with the given
+ // extent, if one exists.
+ const Extension* GetHostedAppByOverlappingWebExtent(
+ const URLPatternSet& extent) const;
// Returns true if |new_url| is in the extent of the same extension as
// |old_url|. Also returns true if neither URL is in an app.
« no previous file with comments | « chrome/common/extensions/extension_messages.h ('k') | chrome/common/extensions/extension_set.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698