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

Unified Diff: extensions/browser/extension_registry.h

Issue 2892843002: Remove RuntimeAPIDelegate::GetPreviousVersion. (Closed)
Patch Set: address missing comments 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
« no previous file with comments | « extensions/browser/api/runtime/runtime_api_delegate.h ('k') | extensions/browser/extension_registry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/extension_registry.h
diff --git a/extensions/browser/extension_registry.h b/extensions/browser/extension_registry.h
index 81bb6f5bef538ecc9f9dab3ebb8355a549edce96..2b9d25ae39c97b38abebb25d2576b011d0f6c6af 100644
--- a/extensions/browser/extension_registry.h
+++ b/extensions/browser/extension_registry.h
@@ -11,6 +11,7 @@
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/observer_list.h"
+#include "base/version.h"
#include "components/keyed_service/core/keyed_service.h"
#include "extensions/browser/uninstall_reason.h"
#include "extensions/common/extension_set.h"
@@ -82,6 +83,16 @@ class ExtensionRegistry : public KeyedService {
std::unique_ptr<ExtensionSet> GenerateInstalledExtensionsSet(
int include_mask) const;
+ // Returns the current version of the extension with the given |id|, if
+ // one exists.
+ // Note: If we are currently updating the extension, this returns the
+ // version stored currently, rather than the in-progress update.
+ //
+ // TODO(lazyboy): Consider updating callers to directly retrieve version()
+ // from either GetExtensionById() or querying ExtensionSet getters of this
+ // class.
+ base::Version GetStoredVersion(const ExtensionId& id) const;
+
// The usual observer interface.
void AddObserver(ExtensionRegistryObserver* observer);
void RemoveObserver(ExtensionRegistryObserver* observer);
« no previous file with comments | « extensions/browser/api/runtime/runtime_api_delegate.h ('k') | extensions/browser/extension_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698