| 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
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..956f7b57a76a8da9e0f62bb56eac314b7803e43a
|
| --- /dev/null
|
| +++ b/chrome/common/extensions/manifest_url_info.cc
|
| @@ -0,0 +1,35 @@
|
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chrome/common/extensions/manifest_url_info.h"
|
| +
|
| +#include "chrome/common/extensions/extension_manifest_constants.h"
|
| +
|
| +namespace keys = extension_manifest_keys;
|
| +
|
| +namespace extensions {
|
| +
|
| +// static
|
| +const GURL& ManifestURLInfo::GetDevToolsPage(const Extension* extension) {
|
| + ManifestURLInfo* info = static_cast<ManifestURLInfo*>(
|
| + extension->GetManifestData(keys::kDevToolsPage));
|
| +
|
| + if (info)
|
| + return info->url_;
|
| + return GURL::EmptyGURL();
|
| +}
|
| +
|
| +// static
|
| +const GURL ManifestURLInfo::GetHomepageURL(const Extension* extension) {
|
| + ManifestURLInfo* info = static_cast<ManifestURLInfo*>(
|
| + extension->GetManifestData(keys::kHomepageURL));
|
| +
|
| + if (info && info->url_.is_valid())
|
| + return info->url_;
|
| + return extension->UpdatesFromGallery() ?
|
| + GURL(extension_urls::GetWebstoreItemDetailURLPrefix() + extension->id()) :
|
| + GURL::EmptyGURL();
|
| +}
|
| +
|
| +} // namespace extensions
|
|
|