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

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

Issue 532973002: Do not return a homepage URL for shared modules (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/manifest_url_handler.cc
diff --git a/chrome/common/extensions/manifest_url_handler.cc b/chrome/common/extensions/manifest_url_handler.cc
index 6aef2ce1327eeb9f3bc2a600aaf252fa57ccab09..03f6919ffddc0e5a1aaa086b7711a52f1254b1ef 100644
--- a/chrome/common/extensions/manifest_url_handler.cc
+++ b/chrome/common/extensions/manifest_url_handler.cc
@@ -20,6 +20,7 @@
#include "extensions/common/manifest.h"
#include "extensions/common/manifest_constants.h"
#include "extensions/common/manifest_handlers/permissions_parser.h"
+#include "extensions/common/manifest_handlers/shared_module_info.h"
#include "extensions/common/permissions/api_permission.h"
#include "extensions/common/permissions/api_permission_set.h"
#include "ui/base/l10n/l10n_util.h"
@@ -56,9 +57,12 @@ const GURL ManifestURL::GetHomepageURL(const Extension* extension) {
const GURL& homepage_url = GetManifestURL(extension, keys::kHomepageURL);
if (homepage_url.is_valid())
return homepage_url;
- return UpdatesFromGallery(extension) ?
- GURL(extension_urls::GetWebstoreItemDetailURLPrefix() + extension->id()) :
- GURL::EmptyGURL();
+ bool use_webstore_url = UpdatesFromGallery(extension) &&
+ !SharedModuleInfo::IsSharedModule(extension);
+ return use_webstore_url
+ ? GURL(extension_urls::GetWebstoreItemDetailURLPrefix() +
+ extension->id())
+ : GURL::EmptyGURL();
}
// static
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698