#include "extensions/common/extension_urls.h"
#include <string_view>
#include "base/strings/escape.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "components/safe_browsing/core/common/features.h"
#include "components/safe_browsing/core/common/hashprefix_realtime/hash_realtime_utils.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension_features.h"
#include "extensions/common/extension_id.h"
#include "extensions/common/extensions_client.h"
#include "net/base/url_util.h"
#include "url/gurl.h"
#include "url/origin.h"
namespace extensions {
bool IsSourceFromAnExtension(const std::u16string& source) { … }
}
namespace extension_urls {
namespace {
const GURL* g_item_snippet_url_for_test_ = …;
}
const char kChromeWebstoreBaseURL[] = …;
const char kNewChromeWebstoreBaseURL[] = …;
const char kChromeWebstoreUpdateURL[] = …;
const char kAppMenuUtmSource[] = …;
const char kExtensionsMenuUtmSource[] = …;
const char kExtensionsSidebarUtmSource[] = …;
#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
const char kGetMostChromeUtmSource[] = "gtmooc";
#endif
GURL GetWebstoreLaunchURL() { … }
GURL GetNewWebstoreLaunchURL() { … }
GURL AppendUtmSource(const GURL& url, std::string_view utm_source_value) { … }
std::string GetWebstoreExtensionsCategoryURL() { … }
std::string GetWebstoreItemDetailURLPrefix() { … }
GURL GetWebstoreItemJsonDataURL(const extensions::ExtensionId& extension_id) { … }
GURL GetWebstoreItemSnippetURL(const extensions::ExtensionId& extension_id) { … }
base::AutoReset<const GURL*> SetItemSnippetURLForTesting(const GURL* test_url) { … }
GURL GetDefaultWebstoreUpdateUrl() { … }
GURL GetWebstoreUpdateUrl() { … }
GURL GetWebstoreReportAbuseUrl(const extensions::ExtensionId& extension_id,
const std::string& referrer_id) { … }
GURL GetNewWebstoreItemRecommendationsUrl(
const extensions::ExtensionId& extension_id) { … }
bool IsWebstoreDomain(const GURL& url) { … }
bool IsWebstoreOrigin(const url::Origin& origin) { … }
bool IsWebstoreUpdateUrl(const GURL& update_url) { … }
bool IsBlocklistUpdateUrl(const GURL& url) { … }
bool IsSafeBrowsingUrl(const GURL& url) { … }
}