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

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

Issue 196663003: Introduce an extension parameter which is used to customize the extension. It's available for exter… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Modified test parameters 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
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 e2a636dbb9ff6432b04e867da126e917b7cc0f2c..425143b2626153948b883a9207eee41d26ac8be8 100644
--- a/chrome/browser/extensions/pending_extension_manager.cc
+++ b/chrome/browser/extensions/pending_extension_manager.cc
@@ -109,9 +109,16 @@ bool PendingExtensionManager::AddFromSync(
const Manifest::Location kSyncLocation = Manifest::INTERNAL;
const bool kMarkAcknowledged = false;
- return AddExtensionImpl(id, update_url, Version(), should_allow_install,
- kIsFromSync, install_silently, kSyncLocation,
- Extension::NO_FLAGS, kMarkAcknowledged);
+ return AddExtensionImpl(id,
+ std::string(),
+ update_url,
+ Version(),
+ should_allow_install,
+ kIsFromSync,
+ install_silently,
+ kSyncLocation,
+ Extension::NO_FLAGS,
+ kMarkAcknowledged);
}
bool PendingExtensionManager::AddFromExtensionImport(
@@ -131,13 +138,21 @@ bool PendingExtensionManager::AddFromExtensionImport(
const Manifest::Location kManifestLocation = Manifest::INTERNAL;
const bool kMarkAcknowledged = false;
- return AddExtensionImpl(id, update_url, Version(), should_allow_install,
- kIsFromSync, kInstallSilently, kManifestLocation,
- Extension::NO_FLAGS, kMarkAcknowledged);
+ return AddExtensionImpl(id,
+ std::string(),
+ update_url,
+ Version(),
+ should_allow_install,
+ kIsFromSync,
+ kInstallSilently,
+ kManifestLocation,
+ Extension::NO_FLAGS,
+ kMarkAcknowledged);
}
bool PendingExtensionManager::AddFromExternalUpdateUrl(
const std::string& id,
+ const std::string& install_parameter,
const GURL& update_url,
Manifest::Location location,
int creation_flags,
@@ -148,9 +163,8 @@ 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 {
@@ -164,9 +178,16 @@ bool PendingExtensionManager::AddFromExternalUpdateUrl(
}
}
- return AddExtensionImpl(id, update_url, Version(), &AlwaysInstall,
- kIsFromSync, kInstallSilently,
- location, creation_flags, mark_acknowledged);
+ return AddExtensionImpl(id,
+ install_parameter,
+ update_url,
+ Version(),
+ &AlwaysInstall,
+ kIsFromSync,
+ kInstallSilently,
+ location,
+ creation_flags,
+ mark_acknowledged);
}
@@ -184,16 +205,16 @@ bool PendingExtensionManager::AddFromExternalFile(
bool kIsFromSync = false;
bool kInstallSilently = true;
- return AddExtensionImpl(
- id,
- kUpdateUrl,
- version,
- &AlwaysInstall,
- kIsFromSync,
- kInstallSilently,
- install_source,
- creation_flags,
- mark_acknowledged);
+ return AddExtensionImpl(id,
+ std::string(),
+ kUpdateUrl,
+ version,
+ &AlwaysInstall,
+ kIsFromSync,
+ kInstallSilently,
+ install_source,
+ creation_flags,
+ mark_acknowledged);
}
void PendingExtensionManager::GetPendingIdsForUpdateCheck(
@@ -217,6 +238,7 @@ void PendingExtensionManager::GetPendingIdsForUpdateCheck(
bool PendingExtensionManager::AddExtensionImpl(
const std::string& id,
+ const std::string& install_parameter,
const GURL& update_url,
const Version& version,
PendingExtensionInfo::ShouldAllowInstallPredicate should_allow_install,
@@ -228,6 +250,7 @@ bool PendingExtensionManager::AddExtensionImpl(
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
PendingExtensionInfo info(id,
+ install_parameter,
update_url,
version,
should_allow_install,
« no previous file with comments | « chrome/browser/extensions/pending_extension_manager.h ('k') | chrome/browser/extensions/test_extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698