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

Unified Diff: extensions/browser/extension_registry.cc

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
« no previous file with comments | « extensions/browser/extension_registry.h ('k') | extensions/browser/test_runtime_api_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/extension_registry.cc
diff --git a/extensions/browser/extension_registry.cc b/extensions/browser/extension_registry.cc
index 9c2bf16f53ec80f74192f883ae8753bbd51d8638..5624b28320a054f1be0a8f447efdbc8cebf9bc61 100644
--- a/extensions/browser/extension_registry.cc
+++ b/extensions/browser/extension_registry.cc
@@ -5,6 +5,7 @@
#include "extensions/browser/extension_registry.h"
#include "base/strings/string_util.h"
+#include "base/version.h"
#include "extensions/browser/extension_registry_factory.h"
#include "extensions/browser/extension_registry_observer.h"
@@ -40,6 +41,14 @@ std::unique_ptr<ExtensionSet> ExtensionRegistry::GenerateInstalledExtensionsSet(
return installed_extensions;
}
+base::Version ExtensionRegistry::GetVersion(const Extension* extension) const {
+ int include_mask = ExtensionRegistry::ENABLED | ExtensionRegistry::DISABLED |
+ ExtensionRegistry::BLACKLISTED |
Devlin 2017/05/19 01:07:09 Why not terminated?
lazyboy 2017/05/19 01:38:48 I don't know, this is copied from ExtensionService
+ ExtensionRegistry::BLOCKED;
+ const Extension* old = GetExtensionById(extension->id(), include_mask);
Devlin 2017/05/19 01:07:09 |old| is no longer accurate
lazyboy 2017/05/19 01:38:48 Renamed.
+ return old ? *old->version() : base::Version();
+}
+
void ExtensionRegistry::AddObserver(ExtensionRegistryObserver* observer) {
observers_.AddObserver(observer);
}
« no previous file with comments | « extensions/browser/extension_registry.h ('k') | extensions/browser/test_runtime_api_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698