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

Side by Side Diff: chrome/common/extensions/features/simple_feature.cc

Issue 23691012: Renamed packaged_app to legacy_packaged_app in extension feature files. It's (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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/features/simple_feature.h" 5 #include "chrome/common/extensions/features/simple_feature.h"
6 6
7 #include <map> 7 #include <map>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/lazy_instance.h" 11 #include "base/lazy_instance.h"
12 #include "base/sha1.h" 12 #include "base/sha1.h"
13 #include "base/strings/string_number_conversions.h" 13 #include "base/strings/string_number_conversions.h"
14 #include "base/strings/string_util.h" 14 #include "base/strings/string_util.h"
15 #include "base/strings/stringprintf.h" 15 #include "base/strings/stringprintf.h"
16 #include "chrome/common/chrome_switches.h" 16 #include "chrome/common/chrome_switches.h"
17 #include "chrome/common/extensions/features/feature_channel.h" 17 #include "chrome/common/extensions/features/feature_channel.h"
18 18
19 using chrome::VersionInfo; 19 using chrome::VersionInfo;
20 20
21 namespace extensions { 21 namespace extensions {
22 22
23 namespace { 23 namespace {
24 24
25 struct Mappings { 25 struct Mappings {
26 Mappings() { 26 Mappings() {
27 extension_types["extension"] = Manifest::TYPE_EXTENSION; 27 extension_types["extension"] = Manifest::TYPE_EXTENSION;
28 extension_types["theme"] = Manifest::TYPE_THEME; 28 extension_types["theme"] = Manifest::TYPE_THEME;
29 extension_types["packaged_app"] = Manifest::TYPE_LEGACY_PACKAGED_APP; 29 extension_types["legacy_packaged_app"] = Manifest::TYPE_LEGACY_PACKAGED_APP;
30 extension_types["hosted_app"] = Manifest::TYPE_HOSTED_APP; 30 extension_types["hosted_app"] = Manifest::TYPE_HOSTED_APP;
31 extension_types["platform_app"] = Manifest::TYPE_PLATFORM_APP; 31 extension_types["platform_app"] = Manifest::TYPE_PLATFORM_APP;
32 extension_types["shared_module"] = Manifest::TYPE_SHARED_MODULE; 32 extension_types["shared_module"] = Manifest::TYPE_SHARED_MODULE;
33 33
34 contexts["blessed_extension"] = Feature::BLESSED_EXTENSION_CONTEXT; 34 contexts["blessed_extension"] = Feature::BLESSED_EXTENSION_CONTEXT;
35 contexts["unblessed_extension"] = Feature::UNBLESSED_EXTENSION_CONTEXT; 35 contexts["unblessed_extension"] = Feature::UNBLESSED_EXTENSION_CONTEXT;
36 contexts["content_script"] = Feature::CONTENT_SCRIPT_CONTEXT; 36 contexts["content_script"] = Feature::CONTENT_SCRIPT_CONTEXT;
37 contexts["web_page"] = Feature::WEB_PAGE_CONTEXT; 37 contexts["web_page"] = Feature::WEB_PAGE_CONTEXT;
38 38
39 locations["component"] = Feature::COMPONENT_LOCATION; 39 locations["component"] = Feature::COMPONENT_LOCATION;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // Gets a human-readable name for the given extension type. 154 // Gets a human-readable name for the given extension type.
155 std::string GetDisplayTypeName(Manifest::Type type) { 155 std::string GetDisplayTypeName(Manifest::Type type) {
156 switch (type) { 156 switch (type) {
157 case Manifest::TYPE_UNKNOWN: 157 case Manifest::TYPE_UNKNOWN:
158 return "unknown"; 158 return "unknown";
159 case Manifest::TYPE_EXTENSION: 159 case Manifest::TYPE_EXTENSION:
160 return "extension"; 160 return "extension";
161 case Manifest::TYPE_HOSTED_APP: 161 case Manifest::TYPE_HOSTED_APP:
162 return "hosted app"; 162 return "hosted app";
163 case Manifest::TYPE_LEGACY_PACKAGED_APP: 163 case Manifest::TYPE_LEGACY_PACKAGED_APP:
164 return "legacy legacy packaged app";
165 case Manifest::TYPE_PLATFORM_APP:
164 return "legacy packaged app"; 166 return "legacy packaged app";
asargent_no_longer_on_chrome 2013/08/29 23:45:59 wow, this was totally wrong before, huh?
not at google - send to devlin 2013/08/29 23:48:12 search-replace fail on my part :)
165 case Manifest::TYPE_PLATFORM_APP:
166 return "packaged app";
167 case Manifest::TYPE_THEME: 167 case Manifest::TYPE_THEME:
168 return "theme"; 168 return "theme";
169 case Manifest::TYPE_USER_SCRIPT: 169 case Manifest::TYPE_USER_SCRIPT:
170 return "user script"; 170 return "user script";
171 case Manifest::TYPE_SHARED_MODULE: 171 case Manifest::TYPE_SHARED_MODULE:
172 return "shared module"; 172 return "shared module";
173 } 173 }
174 174
175 NOTREACHED(); 175 NOTREACHED();
176 return std::string(); 176 return std::string();
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 return false; 451 return false;
452 452
453 if (whitelist_.find(extension_id) != whitelist_.end() || 453 if (whitelist_.find(extension_id) != whitelist_.end() ||
454 whitelist_.find(HashExtensionId(extension_id)) != whitelist_.end()) 454 whitelist_.find(HashExtensionId(extension_id)) != whitelist_.end())
455 return true; 455 return true;
456 456
457 return false; 457 return false;
458 } 458 }
459 459
460 } // namespace extensions 460 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698