Commit ef951b42 authored by Devlin Cronin's avatar Devlin Cronin Committed by Commit Bot

[Extensions Cleanup] Trim extension_urls

Remove unused constants and methods from extension_urls.h/cc.

Bug: None
Change-Id: Ifddcbcaff4fa9a8b6753bd3efe539dc10acbc7fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2131363Reviewed-by: default avatarKelvin Jiang <kelvinjiang@chromium.org>
Commit-Queue: Devlin <rdevlin.cronin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#756861}
parent d6687677
...@@ -16,10 +16,6 @@ ...@@ -16,10 +16,6 @@
namespace extensions { namespace extensions {
const char kEventBindings[] = "event_bindings";
const char kSchemaUtils[] = "schemaUtils";
bool IsSourceFromAnExtension(const base::string16& source) { bool IsSourceFromAnExtension(const base::string16& source) {
return GURL(source).SchemeIs(kExtensionScheme) || return GURL(source).SchemeIs(kExtensionScheme) ||
base::StartsWith(source, base::ASCIIToUTF16("extensions::"), base::StartsWith(source, base::ASCIIToUTF16("extensions::"),
...@@ -58,19 +54,6 @@ GURL GetWebstoreItemJsonDataURL(const std::string& extension_id) { ...@@ -58,19 +54,6 @@ GURL GetWebstoreItemJsonDataURL(const std::string& extension_id) {
extension_id); extension_id);
} }
GURL GetWebstoreJsonSearchUrl(const std::string& query,
const std::string& host_language_code) {
GURL url(GetWebstoreLaunchURL().spec() + "/jsonsearch");
url = net::AppendQueryParameter(url, "q", query);
url = net::AppendQueryParameter(url, "hl", host_language_code);
return url;
}
GURL GetWebstoreSearchPageUrl(const std::string& query) {
return GURL(GetWebstoreLaunchURL().spec() + "/search/" +
net::EscapeQueryParamValue(query, false));
}
GURL GetDefaultWebstoreUpdateUrl() { GURL GetDefaultWebstoreUpdateUrl() {
return GURL(kChromeWebstoreUpdateURL); return GURL(kChromeWebstoreUpdateURL);
} }
......
...@@ -17,12 +17,6 @@ class Origin; ...@@ -17,12 +17,6 @@ class Origin;
namespace extensions { namespace extensions {
// The name of the event_bindings module.
extern const char kEventBindings[];
// The name of the schemaUtils module.
extern const char kSchemaUtils[];
// Determine whether or not a source came from an extension. |source| can link // Determine whether or not a source came from an extension. |source| can link
// to a page or a script, and can be external (e.g., "http://www.google.com"), // to a page or a script, and can be external (e.g., "http://www.google.com"),
// extension-related (e.g., "chrome-extension://<extension_id>/background.js"), // extension-related (e.g., "chrome-extension://<extension_id>/background.js"),
...@@ -57,19 +51,6 @@ std::string GetWebstoreItemDetailURLPrefix(); ...@@ -57,19 +51,6 @@ std::string GetWebstoreItemDetailURLPrefix();
// etc.) about an extension from the webstore as JSON. // etc.) about an extension from the webstore as JSON.
GURL GetWebstoreItemJsonDataURL(const std::string& extension_id); GURL GetWebstoreItemJsonDataURL(const std::string& extension_id);
// Returns the URL used to get webstore search results in JSON format. The URL
// returns a JSON dictionary that has the search results (under "results").
// Each entry in the array is a dictionary as the data returned for
// GetWebstoreItemJsonDataURL above. |query| is the user typed query string.
// |host_language_code| is the host language code, e.g. en_US. Both arguments
// will be escaped and added as a query parameter to the returned web store
// json search URL.
GURL GetWebstoreJsonSearchUrl(const std::string& query,
const std::string& host_language_code);
// Returns the URL of the web store search results page for |query|.
GURL GetWebstoreSearchPageUrl(const std::string& query);
// Returns the compile-time constant webstore update url specific to // Returns the compile-time constant webstore update url specific to
// Chrome. Usually you should prefer using GetWebstoreUpdateUrl. // Chrome. Usually you should prefer using GetWebstoreUpdateUrl.
GURL GetDefaultWebstoreUpdateUrl(); GURL GetDefaultWebstoreUpdateUrl();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment