| 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..6eeac73cdfa5f56a6dac86d2de7402af74fdba73 100644
|
| --- a/chrome/common/extensions/manifest_url_handler.cc
|
| +++ b/chrome/common/extensions/manifest_url_handler.cc
|
| @@ -80,11 +80,6 @@ bool ManifestURL::UpdatesFromGallery(const base::DictionaryValue* manifest) {
|
| }
|
|
|
| // static
|
| -const GURL& ManifestURL::GetOptionsPage(const Extension* extension) {
|
| - return GetManifestURL(extension, keys::kOptionsPage);
|
| -}
|
| -
|
| -// static
|
| const GURL& ManifestURL::GetAboutPage(const Extension* extension) {
|
| return GetManifestURL(extension, keys::kAboutPage);
|
| }
|
| @@ -200,74 +195,6 @@ const std::vector<std::string> UpdateURLHandler::Keys() const {
|
| return SingleKey(keys::kUpdateURL);
|
| }
|
|
|
| -OptionsPageHandler::OptionsPageHandler() {
|
| -}
|
| -
|
| -OptionsPageHandler::~OptionsPageHandler() {
|
| -}
|
| -
|
| -bool OptionsPageHandler::Parse(Extension* extension, base::string16* error) {
|
| - scoped_ptr<ManifestURL> manifest_url(new ManifestURL);
|
| - std::string options_str;
|
| - if (!extension->manifest()->GetString(keys::kOptionsPage, &options_str)) {
|
| - *error = base::ASCIIToUTF16(errors::kInvalidOptionsPage);
|
| - return false;
|
| - }
|
| -
|
| - if (extension->is_hosted_app()) {
|
| - // hosted apps require an absolute URL.
|
| - GURL options_url(options_str);
|
| - if (!options_url.is_valid() ||
|
| - !options_url.SchemeIsHTTPOrHTTPS()) {
|
| - *error = base::ASCIIToUTF16(errors::kInvalidOptionsPageInHostedApp);
|
| - return false;
|
| - }
|
| - manifest_url->url_ = options_url;
|
| - } else {
|
| - GURL absolute(options_str);
|
| - if (absolute.is_valid()) {
|
| - *error =
|
| - base::ASCIIToUTF16(errors::kInvalidOptionsPageExpectUrlInPackage);
|
| - return false;
|
| - }
|
| - manifest_url->url_ = extension->GetResourceURL(options_str);
|
| - if (!manifest_url->url_.is_valid()) {
|
| - *error = base::ASCIIToUTF16(errors::kInvalidOptionsPage);
|
| - return false;
|
| - }
|
| - }
|
| -
|
| - extension->SetManifestData(keys::kOptionsPage, manifest_url.release());
|
| - return true;
|
| -}
|
| -
|
| -bool OptionsPageHandler::Validate(const Extension* extension,
|
| - std::string* error,
|
| - std::vector<InstallWarning>* warnings) const {
|
| - // 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 (!extensions::ManifestURL::GetOptionsPage(extension).is_empty() &&
|
| - !extension->is_hosted_app()) {
|
| - const base::FilePath options_path =
|
| - extensions::file_util::ExtensionURLToRelativeFilePath(
|
| - extensions::ManifestURL::GetOptionsPage(extension));
|
| - const base::FilePath path =
|
| - extension->GetResource(options_path).GetFilePath();
|
| - if (path.empty() || !base::PathExists(path)) {
|
| - *error =
|
| - l10n_util::GetStringFUTF8(
|
| - IDS_EXTENSION_LOAD_OPTIONS_PAGE_FAILED,
|
| - options_path.LossyDisplayName());
|
| - return false;
|
| - }
|
| - }
|
| - return true;
|
| -}
|
| -
|
| -const std::vector<std::string> OptionsPageHandler::Keys() const {
|
| - return SingleKey(keys::kOptionsPage);
|
| -}
|
| -
|
| AboutPageHandler::AboutPageHandler() {
|
| }
|
|
|
|
|