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

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

Issue 2925193002: NOT YET READY: UMA recording the kind of target frame when extensions pierce browsing instance.
Patch Set: Rebasing... Created 3 years, 6 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
« no previous file with comments | « chrome/common/extensions/sync_helper.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 <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 case Manifest::TYPE_LEGACY_PACKAGED_APP: 66 case Manifest::TYPE_LEGACY_PACKAGED_APP:
67 return "legacy packaged app"; 67 return "legacy packaged app";
68 case Manifest::TYPE_PLATFORM_APP: 68 case Manifest::TYPE_PLATFORM_APP:
69 return "packaged app"; 69 return "packaged app";
70 case Manifest::TYPE_THEME: 70 case Manifest::TYPE_THEME:
71 return "theme"; 71 return "theme";
72 case Manifest::TYPE_USER_SCRIPT: 72 case Manifest::TYPE_USER_SCRIPT:
73 return "user script"; 73 return "user script";
74 case Manifest::TYPE_SHARED_MODULE: 74 case Manifest::TYPE_SHARED_MODULE:
75 return "shared module"; 75 return "shared module";
76 case Manifest::NUM_LOAD_TYPES:
77 NOTREACHED();
78 } 76 }
79 NOTREACHED(); 77 NOTREACHED();
80 return ""; 78 return "";
81 } 79 }
82 80
83 // Gets a human-readable name for the given context type, suitable for giving 81 // Gets a human-readable name for the given context type, suitable for giving
84 // to developers in an error message. 82 // to developers in an error message.
85 std::string GetDisplayName(Feature::Context context) { 83 std::string GetDisplayName(Feature::Context context) {
86 switch (context) { 84 switch (context) {
87 case Feature::UNSPECIFIED_CONTEXT: 85 case Feature::UNSPECIFIED_CONTEXT:
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 // "matches" from say "blessed_extension" then they can use complex features. 605 // "matches" from say "blessed_extension" then they can use complex features.
608 if ((context == WEB_PAGE_CONTEXT || context == WEBUI_CONTEXT) && 606 if ((context == WEB_PAGE_CONTEXT || context == WEBUI_CONTEXT) &&
609 !matches_.MatchesURL(url)) { 607 !matches_.MatchesURL(url)) {
610 return CreateAvailability(INVALID_URL, url); 608 return CreateAvailability(INVALID_URL, url);
611 } 609 }
612 610
613 return CreateAvailability(IS_AVAILABLE); 611 return CreateAvailability(IS_AVAILABLE);
614 } 612 }
615 613
616 } // namespace extensions 614 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/common/extensions/sync_helper.cc ('k') | extensions/common/manifest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698