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

Unified Diff: chrome/common/extensions/extension_constants.cc

Issue 65163003: Move GetWebstoreLaunchURL and GetWebstoreItemDetailURLPrefix to extensions/common/extension_urls.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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/common/extensions/extension_constants.cc
diff --git a/chrome/common/extensions/extension_constants.cc b/chrome/common/extensions/extension_constants.cc
index 289428302fb8ce63d070e04db2885136c5401016..afb38549f4a7396fcb3e883ae5d1bb8871c5a1bc 100644
--- a/chrome/common/extensions/extension_constants.cc
+++ b/chrome/common/extensions/extension_constants.cc
@@ -9,45 +9,9 @@
#include "base/command_line.h"
#include "base/strings/string_util.h"
#include "chrome/common/chrome_switches.h"
-#include "net/base/escape.h"
-#include "net/base/url_util.h"
namespace extension_urls {
-std::string GetWebstoreLaunchURL() {
- std::string gallery_prefix = kGalleryBrowsePrefix;
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kAppsGalleryURL))
- gallery_prefix = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
- switches::kAppsGalleryURL);
- if (EndsWith(gallery_prefix, "/", true))
- gallery_prefix = gallery_prefix.substr(0, gallery_prefix.length() - 1);
- return gallery_prefix;
-}
-
-std::string GetExtensionGalleryURL() {
- return GetWebstoreLaunchURL() + "/category/extensions";
-}
-
-std::string GetWebstoreItemDetailURLPrefix() {
- return GetWebstoreLaunchURL() + "/detail/";
-}
-
-GURL GetWebstoreItemJsonDataURL(const std::string& extension_id) {
- return GURL(GetWebstoreLaunchURL() + "/inlineinstall/detail/" + extension_id);
-}
-
-GURL GetWebstoreJsonSearchUrl(const std::string& query, const std::string& hl) {
- GURL url(GetWebstoreLaunchURL() + "/jsonsearch");
- url = net::AppendQueryParameter(url, "q", query);
- url = net::AppendQueryParameter(url, "hl", hl);
- return url;
-}
-
-GURL GetWebstoreSearchPageUrl(const std::string& query) {
- return GURL(GetWebstoreLaunchURL() + "/search/" +
- net::EscapeQueryParamValue(query, false));
-}
miket_OOO 2013/11/07 21:39:41 I kind of regret that these are now getting spraye
Yoyo Zhou 2013/11/08 02:03:09 These belong to, for example, the app list and/or
-
const char kGalleryUpdateHttpsUrl[] =
"https://clients2.google.com/service/update2/crx";
// TODO(battre): Delete the HTTP URL once the blacklist is downloaded via HTTPS.
@@ -85,8 +49,6 @@ bool IsBlacklistUpdateUrl(const GURL& url) {
StartsWithASCII(url.spec(), kExtensionBlocklistHttpsUrlPrefix, true);
}
-const char kGalleryBrowsePrefix[] = "https://chrome.google.com/webstore";
-
const char kWebstoreSourceField[] = "utm_source";
const char kLaunchSourceAppList[] = "chrome-app-launcher";

Powered by Google App Engine
This is Rietveld 408576698