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

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

Issue 299853002: Make installed_loader UMA less wasteful. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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
« no previous file with comments | « extensions/browser/extension_web_contents_observer.cc ('k') | extensions/common/manifest.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « extensions/browser/extension_web_contents_observer.cc ('k') | extensions/common/manifest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698