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

Unified Diff: chrome/common/extensions/extension_file_util.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: fixed HomepageURLManifestTest.GetHomepageURL Created 7 years, 11 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
Index: chrome/common/extensions/extension_file_util.cc
diff --git a/chrome/common/extensions/extension_file_util.cc b/chrome/common/extensions/extension_file_util.cc
index d6dea3fc44a7c4342c0c007e28626e1c2f7efb0a..7b5ca58a2200cb312121bea6b98e91069f3fae61 100644
--- a/chrome/common/extensions/extension_file_util.cc
+++ b/chrome/common/extensions/extension_file_util.cc
@@ -24,6 +24,7 @@
#include "chrome/common/extensions/extension_manifest_constants.h"
#include "chrome/common/extensions/extension_messages.h"
#include "chrome/common/extensions/extension_resource.h"
+#include "chrome/common/extensions/manifest_url_handler.h"
#include "chrome/common/extensions/message_bundle.h"
#include "grit/generated_resources.h"
#include "net/base/escape.h"
@@ -373,9 +374,10 @@ bool ValidateExtension(const Extension* extension,
// Validate path to the options page. Don't check the URL for hosted apps,
// because they are expected to refer to an external URL.
- if (!extension->options_url().is_empty() && !extension->is_hosted_app()) {
+ if (!extensions::ManifestURL::GetOptionsPage(extension).is_empty() &&
+ !extension->is_hosted_app()) {
const FilePath options_path = ExtensionURLToRelativeFilePath(
- extension->options_url());
+ extensions::ManifestURL::GetOptionsPage(extension));
const FilePath path = extension->GetResource(options_path).GetFilePath();
if (path.empty() || !file_util::PathExists(path)) {
*error =

Powered by Google App Engine
This is Rietveld 408576698