OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/common/features/simple_feature.h" | 5 #include "extensions/common/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" |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 case Manifest::TYPE_LEGACY_PACKAGED_APP: | 156 case Manifest::TYPE_LEGACY_PACKAGED_APP: |
157 return "legacy packaged app"; | 157 return "legacy packaged app"; |
158 case Manifest::TYPE_PLATFORM_APP: | 158 case Manifest::TYPE_PLATFORM_APP: |
159 return "packaged app"; | 159 return "packaged app"; |
160 case Manifest::TYPE_THEME: | 160 case Manifest::TYPE_THEME: |
161 return "theme"; | 161 return "theme"; |
162 case Manifest::TYPE_USER_SCRIPT: | 162 case Manifest::TYPE_USER_SCRIPT: |
163 return "user script"; | 163 return "user script"; |
164 case Manifest::TYPE_SHARED_MODULE: | 164 case Manifest::TYPE_SHARED_MODULE: |
165 return "shared module"; | 165 return "shared module"; |
| 166 case Manifest::NUM_LOAD_TYPES: |
| 167 NOTREACHED(); |
166 } | 168 } |
167 NOTREACHED(); | 169 NOTREACHED(); |
168 return ""; | 170 return ""; |
169 } | 171 } |
170 | 172 |
171 // Gets a human-readable name for the given context type, suitable for giving | 173 // Gets a human-readable name for the given context type, suitable for giving |
172 // to developers in an error message. | 174 // to developers in an error message. |
173 std::string GetDisplayName(Feature::Context context) { | 175 std::string GetDisplayName(Feature::Context context) { |
174 switch (context) { | 176 switch (context) { |
175 case Feature::UNSPECIFIED_CONTEXT: | 177 case Feature::UNSPECIFIED_CONTEXT: |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 return manifest_location == Manifest::COMPONENT; | 516 return manifest_location == Manifest::COMPONENT; |
515 case SimpleFeature::POLICY_LOCATION: | 517 case SimpleFeature::POLICY_LOCATION: |
516 return manifest_location == Manifest::EXTERNAL_POLICY || | 518 return manifest_location == Manifest::EXTERNAL_POLICY || |
517 manifest_location == Manifest::EXTERNAL_POLICY_DOWNLOAD; | 519 manifest_location == Manifest::EXTERNAL_POLICY_DOWNLOAD; |
518 } | 520 } |
519 NOTREACHED(); | 521 NOTREACHED(); |
520 return false; | 522 return false; |
521 } | 523 } |
522 | 524 |
523 } // namespace extensions | 525 } // namespace extensions |
OLD | NEW |