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

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

Issue 411004: Special case the gallery to not show the scary download roadblock. (Closed)
Patch Set: add comments Created 11 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
« no previous file with comments | « chrome/browser/extensions/extensions_service.h ('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/extensions_service.cc
diff --git a/chrome/browser/extensions/extensions_service.cc b/chrome/browser/extensions/extensions_service.cc
index 4a8b7c3bedbcd837c7eea4171da6711b4ab4b5de..c254b928021d58e9375910ee788a95900f3b78bf 100644
--- a/chrome/browser/extensions/extensions_service.cc
+++ b/chrome/browser/extensions/extensions_service.cc
@@ -68,20 +68,24 @@ class InstalledExtensionSet {
const char* ExtensionsService::kInstallDirectoryName = "Extensions";
const char* ExtensionsService::kCurrentVersionFileName = "Current Version";
-const char* ExtensionsService::kGalleryDownloadURLPrefix =
- "https://dl-ssl.google.com/chrome/";
-const char* ExtensionsService::kGalleryURLPrefix =
- "https://tools.google.com/chrome/";
-
// static
bool ExtensionsService::IsDownloadFromGallery(const GURL& download_url,
const GURL& referrer_url) {
- if (StartsWithASCII(download_url.spec(), kGalleryDownloadURLPrefix, false) &&
- StartsWithASCII(referrer_url.spec(), kGalleryURLPrefix, false)) {
+ if (StartsWithASCII(download_url.spec(),
+ extension_urls::kMiniGalleryDownloadPrefix, false) &&
+ StartsWithASCII(referrer_url.spec(),
+ extension_urls::kMiniGalleryBrowsePrefix, false)) {
return true;
- } else {
- return false;
}
+
+ if (StartsWithASCII(download_url.spec(),
+ extension_urls::kGalleryDownloadPrefix, false) &&
+ StartsWithASCII(referrer_url.spec(),
+ extension_urls::kGalleryBrowsePrefix, false)) {
+ return true;
+ }
+
+ return false;
}
ExtensionsService::ExtensionsService(Profile* profile,
« no previous file with comments | « chrome/browser/extensions/extensions_service.h ('k') | chrome/browser/extensions/extensions_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698