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

Unified Diff: extensions/browser/pending_extension_manager.cc

Issue 195813007: Remove ExtensionService::IsExternalExtensionUninstalled() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 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/pending_extension_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/pending_extension_manager.cc
diff --git a/extensions/browser/pending_extension_manager.cc b/extensions/browser/pending_extension_manager.cc
index d16b92b9dfb7856109a408de3eee8becce1f9414..74c44c6db0de2fde3eb9dc9ad5c520d7994f9d82 100644
--- a/extensions/browser/pending_extension_manager.cc
+++ b/extensions/browser/pending_extension_manager.cc
@@ -10,6 +10,7 @@
#include "base/version.h"
#include "chrome/browser/extensions/extension_service.h"
#include "content/public/browser/browser_thread.h"
+#include "extensions/browser/extension_prefs.h"
#include "extensions/common/extension.h"
#include "url/gurl.h"
@@ -31,9 +32,9 @@ std::string GetVersionString(const Version& version) {
namespace extensions {
PendingExtensionManager::PendingExtensionManager(
- const ExtensionServiceInterface& service)
- : service_(service) {
-}
+ const ExtensionServiceInterface& service,
+ content::BrowserContext* context)
+ : service_(service), context_(context) {}
PendingExtensionManager::~PendingExtensionManager() {}
@@ -148,13 +149,12 @@ bool PendingExtensionManager::AddFromExternalUpdateUrl(
const bool kInstallSilently = true;
const Extension* extension = service_.GetInstalledExtension(id);
- if (extension &&
- location == Manifest::GetHigherPriorityLocation(location,
- extension->location())) {
+ if (extension && location == Manifest::GetHigherPriorityLocation(
+ location, extension->location())) {
// If the new location has higher priority than the location of an existing
// extension, let the update process overwrite the existing extension.
} else {
- if (service_.IsExternalExtensionUninstalled(id))
+ if (ExtensionPrefs::Get(context_)->IsExternalExtensionUninstalled(id))
Yoyo Zhou 2014/03/18 01:23:37 Could also use service->GetBrowserContext here.
Devlin 2014/03/18 17:24:12 Actually, can't... |service_| is an ExtensionServi
Yoyo Zhou 2014/03/22 00:34:37 May as well leave it as is for now then.
return false;
if (extension) {
« no previous file with comments | « extensions/browser/pending_extension_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698