X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fchrome%2Fcommon%2Fextensions%2Fextension_constants.cc;h=9a5c3f5068e5c1f4157c53203073232751f1a217;hb=3545e9f2671f595d2a2f3ee75ca0393b01e35ef6;hp=c21de097c5e74bf3768ddbfa925fb8c0fea87a02;hpb=7d210d4c7e9ba36e635eabc5b5780495f8a63292;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/chrome/common/extensions/extension_constants.cc b/src/chrome/common/extensions/extension_constants.cc index c21de09..9a5c3f5 100644 --- a/src/chrome/common/extensions/extension_constants.cc +++ b/src/chrome/common/extensions/extension_constants.cc @@ -4,93 +4,19 @@ #include "chrome/common/extensions/extension_constants.h" -#include - -#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)); -} +namespace { const char kGalleryUpdateHttpsUrl[] = "https://clients2.google.com/service/update2/crx"; -// TODO(battre): Delete the HTTP URL once the blacklist is downloaded via HTTPS. -const char kExtensionBlocklistUrlPrefix[] = - "http://www.gstatic.com/chrome/extensions/blacklist"; -const char kExtensionBlocklistHttpsUrlPrefix[] = - "https://www.gstatic.com/chrome/extensions/blacklist"; - -GURL GetWebstoreUpdateUrl() { - CommandLine* cmdline = CommandLine::ForCurrentProcess(); - if (cmdline->HasSwitch(switches::kAppsGalleryUpdateURL)) - return GURL(cmdline->GetSwitchValueASCII(switches::kAppsGalleryUpdateURL)); - else - return GetDefaultWebstoreUpdateUrl(); -} + +} // namespace GURL GetDefaultWebstoreUpdateUrl() { return GURL(kGalleryUpdateHttpsUrl); } -bool IsWebstoreUpdateUrl(const GURL& update_url) { - GURL store_url = GetWebstoreUpdateUrl(); - if (update_url == store_url) { - return true; - } else { - return (update_url.host() == store_url.host() && - update_url.path() == store_url.path()); - } -} - -bool IsBlacklistUpdateUrl(const GURL& url) { - // The extension blacklist URL is returned from the update service and - // therefore not determined by Chromium. If the location of the blacklist file - // ever changes, we need to update this function. A DCHECK in the - // ExtensionUpdater ensures that we notice a change. This is the full URL - // of a blacklist: - // http://www.gstatic.com/chrome/extensions/blacklist/l_0_0_0_7.txt - return StartsWithASCII(url.spec(), kExtensionBlocklistUrlPrefix, true) || - StartsWithASCII(url.spec(), kExtensionBlocklistHttpsUrlPrefix, true); -} - -const char kGalleryBrowsePrefix[] = "https://chrome.google.com/webstore"; - const char kWebstoreSourceField[] = "utm_source"; const char kLaunchSourceAppList[] = "chrome-app-launcher"; @@ -116,7 +42,10 @@ const char kHTermAppId[] = "pnhechapfaindjhompbnflcldabbghjo"; const char kHTermDevAppId[] = "okddffdblfhhnmhodogpojmfkjmhinfp"; const char kIdentityApiUiAppId[] = "ahjaciijnoiaklcomgnblndopackapon"; const char kCroshBuiltinAppId[] = "nkoccljplnhpfnfiajclkommnmllphnl"; +const char kHotwordAudioVerificationAppId[] = + "abjokfonkihficiokmkfboogholifghn"; const char kHotwordExtensionId[] = "bepbmhgboaologfdajaanbcjmnhjmhfn"; +const char kHotwordSharedModuleId[] = "lccekmodgklaepjeofjdjpbminllajkg"; const char kPdfExtensionId[] = "mhjfbmdgcfjbbpaeojofohoefgiehjai"; const char kQuickOfficeComponentExtensionId[] = "bpmcpldpdmajfigpchkicefoigmkfalc"; @@ -126,7 +55,6 @@ const char kQuickOfficeExtensionId[] = "gbkeegbaiigmenfmjfclcdgdpimamgkj"; const char kSettingsAppId[] = "ennkphjdgehloodpbhlhldgbnhmacadg"; const char kStreamsPrivateTestExtensionId[] = "oickdpebdnfbgkcaoklfcdhjniefkcji"; -const char kWebStoreAppId[] = "ahfgeienlihckogmohjhadlkjgocpleb"; const char kYoutubeAppId[] = "blpcfgokakmgnkcojhhkbfbldkacnbeo"; const char kInAppPaymentsSupportAppId[] = "nmmhkkegccagdldgiimedpiccmgmieda"; @@ -139,6 +67,8 @@ const char kChromeVoxExtensionId[] = const char kChromeVoxExtensionPath[] = "chromeos/chromevox"; const char kChromeVoxManifestFilename[] = "manifest.json"; const char kChromeVoxGuestManifestFilename[] = "manifest_guest.json"; +const char kChromeVoxNextManifestFilename[] = "manifest_next.json"; +const char kChromeVoxNextGuestManifestFilename[] = "manifest_next_guest.json"; const char kBrailleImeExtensionId[] = "jddehjeebkoimngcbdkaahpobgicbffp"; const char kBrailleImeExtensionPath[] =