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

Unified Diff: chrome/browser/extensions/pending_extension_manager.cc

Issue 14973007: Auto-install/uninstall shared module dependencies for extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 7 years, 6 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: chrome/browser/extensions/pending_extension_manager.cc
diff --git a/chrome/browser/extensions/pending_extension_manager.cc b/chrome/browser/extensions/pending_extension_manager.cc
index 15aac529980bd3821a23ecf73b234b5b28bbd618..fcf166085d07d08ddf4e365fc8bdb3a43df161b7 100644
--- a/chrome/browser/extensions/pending_extension_manager.cc
+++ b/chrome/browser/extensions/pending_extension_manager.cc
@@ -119,6 +119,26 @@ bool PendingExtensionManager::AddFromSync(
kIsFromSync, install_silently, kSyncLocation);
}
+bool PendingExtensionManager::AddFromExtensionImport(
+ const std::string& id,
+ const GURL& update_url,
+ PendingExtensionInfo::ShouldAllowInstallPredicate should_allow_install) {
+ CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
+
+ if (service_.GetInstalledExtension(id)) {
+ LOG(ERROR) << "Trying to add pending extension " << id
+ << " which already exists";
+ return false;
+ }
+
+ const bool kIsFromSync = false;
+ const bool kInstallSilently = true;
+ const Manifest::Location kManifestLocation = Manifest::INTERNAL;
+
+ return AddExtensionImpl(id, update_url, Version(), should_allow_install,
+ kIsFromSync, kInstallSilently, kManifestLocation);
+}
+
bool PendingExtensionManager::AddFromExternalUpdateUrl(
const std::string& id,
const GURL& update_url,

Powered by Google App Engine
This is Rietveld 408576698