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

Unified Diff: extensions/browser/extension_registry.h

Issue 2892843002: Remove RuntimeAPIDelegate::GetPreviousVersion. (Closed)
Patch Set: . Created 3 years, 7 months 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: extensions/browser/extension_registry.h
diff --git a/extensions/browser/extension_registry.h b/extensions/browser/extension_registry.h
index 81bb6f5bef538ecc9f9dab3ebb8355a549edce96..e5a6e08b9f873035d337dcbf9e888571cb92967d 100644
--- a/extensions/browser/extension_registry.h
+++ b/extensions/browser/extension_registry.h
@@ -20,6 +20,10 @@
#error "Extensions must be enabled"
#endif
+namespace base {
+class Version;
Devlin 2017/05/19 02:04:01 nit: Since we return a non-pointer for base::Versi
lazyboy 2017/05/19 18:24:55 Yes, fixed.
+}
+
namespace content {
class BrowserContext;
}
@@ -82,6 +86,15 @@ class ExtensionRegistry : public KeyedService {
std::unique_ptr<ExtensionSet> GenerateInstalledExtensionsSet(
int include_mask) const;
+ // Returns the current version of the extension.
+ // Note that if we are in the process of updating the extension, this will
+ // return the version before update.
+ //
+ // TODO(lazyboy): Consider updating callers to directly retrieve version()
+ // from either GetExtensionById() or querying ExtensionSet getters of this
+ // class.
+ base::Version GetVersion(const Extension* extension) const;
Devlin 2017/05/19 02:04:00 Without the context of this patch, it's *very* why
lazyboy 2017/05/19 18:24:55 GetStoredVersion is definitely better than GetVers
+
// The usual observer interface.
void AddObserver(ExtensionRegistryObserver* observer);
void RemoveObserver(ExtensionRegistryObserver* observer);

Powered by Google App Engine
This is Rietveld 408576698