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

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

Issue 10782030: Add content pack information to Extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/common/extensions/manifest.h" 5 #include "chrome/common/extensions/manifest.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/string_split.h" 10 #include "base/string_split.h"
(...skipping 17 matching lines...) Expand all
28 type_ = Extension::TYPE_THEME; 28 type_ = Extension::TYPE_THEME;
29 } else if (value_->HasKey(keys::kApp)) { 29 } else if (value_->HasKey(keys::kApp)) {
30 if (value_->Get(keys::kWebURLs, NULL) || 30 if (value_->Get(keys::kWebURLs, NULL) ||
31 value_->Get(keys::kLaunchWebURL, NULL)) { 31 value_->Get(keys::kLaunchWebURL, NULL)) {
32 type_ = Extension::TYPE_HOSTED_APP; 32 type_ = Extension::TYPE_HOSTED_APP;
33 } else if (value_->Get(keys::kPlatformAppBackground, NULL)) { 33 } else if (value_->Get(keys::kPlatformAppBackground, NULL)) {
34 type_ = Extension::TYPE_PLATFORM_APP; 34 type_ = Extension::TYPE_PLATFORM_APP;
35 } else { 35 } else {
36 type_ = Extension::TYPE_PACKAGED_APP; 36 type_ = Extension::TYPE_PACKAGED_APP;
37 } 37 }
38 } else if (value_->HasKey(keys::kContentPack)) {
39 type_ = Extension::TYPE_CONTENT_PACK;
38 } else { 40 } else {
39 type_ = Extension::TYPE_EXTENSION; 41 type_ = Extension::TYPE_EXTENSION;
40 } 42 }
41 CHECK_NE(type_, Extension::TYPE_UNKNOWN); 43 CHECK_NE(type_, Extension::TYPE_UNKNOWN);
42 } 44 }
43 45
44 Manifest::~Manifest() { 46 Manifest::~Manifest() {
45 } 47 }
46 48
47 void Manifest::ValidateManifest( 49 void Manifest::ValidateManifest(
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 SimpleFeatureProvider::GetManifestFeatures()->GetFeature(key); 171 SimpleFeatureProvider::GetManifestFeatures()->GetFeature(key);
170 if (!feature) 172 if (!feature)
171 return true; 173 return true;
172 174
173 return Feature::IS_AVAILABLE == feature->IsAvailableToManifest( 175 return Feature::IS_AVAILABLE == feature->IsAvailableToManifest(
174 extension_id_, type_, Feature::ConvertLocation(location_), 176 extension_id_, type_, Feature::ConvertLocation(location_),
175 GetManifestVersion()); 177 GetManifestVersion());
176 } 178 }
177 179
178 } // namespace extensions 180 } // namespace extensions
OLDNEW
« chrome/common/extensions/extension.h ('K') | « chrome/common/extensions/manifest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698