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

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

Issue 11726002: Move the parsing of 'update_url' & 'options_page' URLs out of Extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@url_parse
Patch Set: Created 8 years 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
Index: chrome/common/extensions/manifest_url_info.cc
diff --git a/chrome/common/extensions/manifest_url_info.cc b/chrome/common/extensions/manifest_url_info.cc
index 956f7b57a76a8da9e0f62bb56eac314b7803e43a..fb6426e7da8285807775880399bccdb3b9ef486c 100644
--- a/chrome/common/extensions/manifest_url_info.cc
+++ b/chrome/common/extensions/manifest_url_info.cc
@@ -14,10 +14,7 @@ namespace extensions {
const GURL& ManifestURLInfo::GetDevToolsPage(const Extension* extension) {
ManifestURLInfo* info = static_cast<ManifestURLInfo*>(
extension->GetManifestData(keys::kDevToolsPage));
-
- if (info)
- return info->url_;
- return GURL::EmptyGURL();
+ return info ? info->url_ : GURL::EmptyGURL();
}
// static
@@ -32,4 +29,18 @@ const GURL ManifestURLInfo::GetHomepageURL(const Extension* extension) {
GURL::EmptyGURL();
}
+// static
+const GURL& ManifestURLInfo::GetUpdateURL(const Extension* extension) {
Yoyo Zhou 2013/01/03 23:16:00 Since these 2 are very similar to GetDevToolsPage,
Joe Thomas 2013/01/04 01:36:27 Done.
+ ManifestURLInfo* info = static_cast<ManifestURLInfo*>(
+ extension->GetManifestData(keys::kUpdateURL));
+ return info ? info->url_ : GURL::EmptyGURL();
+}
+
+// static
+const GURL& ManifestURLInfo::GetOptionsPage(const Extension* extension) {
+ ManifestURLInfo* info = static_cast<ManifestURLInfo*>(
+ extension->GetManifestData(keys::kOptionsPage));
+ return info ? info->url_ : GURL::EmptyGURL();
+}
+
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698