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

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

Issue 8391004: Add webstorePrivate API for installing bundles of extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 2 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 | « chrome/browser/extensions/webstore_bundle_browsertest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/webstore_installer.cc
diff --git a/chrome/browser/extensions/webstore_installer.cc b/chrome/browser/extensions/webstore_installer.cc
index a32f4c29c76363eb3280dc3b3b63336a5a4261f5..796e94ad0899b4598671a63e7a03724859c862e1 100644
--- a/chrome/browser/extensions/webstore_installer.cc
+++ b/chrome/browser/extensions/webstore_installer.cc
@@ -4,6 +4,8 @@
#include "chrome/browser/extensions/webstore_installer.h"
+#include "base/command_line.h"
+#include "base/stringprintf.h"
#include "base/string_util.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/crx_installer.h"
@@ -12,6 +14,7 @@
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_notification_types.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
#include "content/browser/tab_contents/navigation_controller.h"
@@ -30,6 +33,13 @@ const char kDefaultInstallSource[] = "";
GURL GetWebstoreInstallURL(
const std::string& extension_id, const std::string& install_source) {
+ CommandLine* cmd_line = CommandLine::ForCurrentProcess();
+ if (cmd_line->HasSwitch(switches::kAppsGalleryDownloadURL)) {
+ std::string download_url =
+ cmd_line->GetSwitchValueASCII(switches::kAppsGalleryDownloadURL);
+ return GURL(base::StringPrintf(download_url.c_str(),
+ extension_id.c_str()));
+ }
std::vector<std::string> params;
params.push_back("id=" + extension_id);
if (!install_source.empty()) {
« no previous file with comments | « chrome/browser/extensions/webstore_bundle_browsertest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698