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

Side by Side Diff: chrome/common/extensions/manifest_url_info.cc

Issue 11624036: Move the parsing of homepage_url" and "devtools_page" out of Extension. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comments addressed 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/common/extensions/manifest_url_info.h"
6
7 #include "chrome/common/extensions/extension_manifest_constants.h"
8
9 namespace keys = extension_manifest_keys;
10
11 namespace extensions {
12
13 // static
14 const GURL& ManifestURLInfo::GetDevToolsPage(const Extension* extension) {
15 ManifestURLInfo* info = static_cast<ManifestURLInfo*>(
16 extension->GetManifestData(keys::kDevToolsPage));
17
18 if (info)
19 return info->url_;
20 return GURL::EmptyGURL();
21 }
22
23 // static
24 const GURL ManifestURLInfo::GetHomepageURL(const Extension* extension) {
25 ManifestURLInfo* info = static_cast<ManifestURLInfo*>(
26 extension->GetManifestData(keys::kHomepageURL));
27
28 if (info && info->url_.is_valid())
29 return info->url_;
30 return extension->UpdatesFromGallery() ?
31 GURL(extension_urls::GetWebstoreItemDetailURLPrefix() + extension->id()) :
32 GURL::EmptyGURL();
33 }
34
35 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698