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

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

Issue 7743004: Move extension/webstore-related URL getters to the extension_urls namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review feedback. Created 9 years, 4 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/extension_updater_unittest.cc ('k') | chrome/browser/extensions/extensions_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_webstore_private_api.cc
diff --git a/chrome/browser/extensions/extension_webstore_private_api.cc b/chrome/browser/extensions/extension_webstore_private_api.cc
index 90c2741e1856ad5162e67b86bfbb4366f921219f..5453b424d54243bb1b89bf7c472880e78943ff1c 100644
--- a/chrome/browser/extensions/extension_webstore_private_api.cc
+++ b/chrome/browser/extensions/extension_webstore_private_api.cc
@@ -32,7 +32,6 @@
#include "content/common/notification_source.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
-#include "net/base/escape.h"
#include "ui/base/l10n/l10n_util.h"
namespace {
@@ -515,15 +514,8 @@ bool CompleteInstallFunction::RunImpl() {
return false;
}
- std::vector<std::string> params;
- params.push_back("id=" + id);
- params.push_back("lang=" + g_browser_process->GetApplicationLocale());
- params.push_back("uc");
- std::string url_string = Extension::GalleryUpdateUrl(true).spec();
-
- GURL url(url_string + "?response=redirect&x=" +
- EscapeQueryParamValue(JoinString(params, '&'), true));
- DCHECK(url.is_valid());
+ GURL install_url(extension_urls::GetWebstoreInstallUrl(
+ id, g_browser_process->GetApplicationLocale()));
// The download url for the given |id| is now contained in |url|. We
// navigate the current (calling) tab to this url which will result in a
@@ -532,7 +524,7 @@ bool CompleteInstallFunction::RunImpl() {
// normal permissions install dialog.
NavigationController& controller =
dispatcher()->delegate()->GetAssociatedTabContents()->controller();
- controller.LoadURL(url, source_url(), PageTransition::LINK);
+ controller.LoadURL(install_url, source_url(), PageTransition::LINK);
return true;
}
« no previous file with comments | « chrome/browser/extensions/extension_updater_unittest.cc ('k') | chrome/browser/extensions/extensions_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698