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/bind.h" | 10 #include "base/bind.h" |
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
503 Context context) const { | 503 Context context) const { |
504 return Availability( | 504 return Availability( |
505 result, GetAvailabilityMessage(result, Manifest::TYPE_UNKNOWN, GURL(), | 505 result, GetAvailabilityMessage(result, Manifest::TYPE_UNKNOWN, GURL(), |
506 context)); | 506 context)); |
507 } | 507 } |
508 | 508 |
509 bool SimpleFeature::IsInternal() const { | 509 bool SimpleFeature::IsInternal() const { |
510 return false; | 510 return false; |
511 } | 511 } |
512 | 512 |
513 bool SimpleFeature::IsBlockedInServiceWorker() const { return false; } | |
514 | |
515 bool SimpleFeature::IsIdInBlacklist(const std::string& extension_id) const { | 513 bool SimpleFeature::IsIdInBlacklist(const std::string& extension_id) const { |
516 return IsIdInList(extension_id, blacklist_); | 514 return IsIdInList(extension_id, blacklist_); |
517 } | 515 } |
518 | 516 |
519 bool SimpleFeature::IsIdInWhitelist(const std::string& extension_id) const { | 517 bool SimpleFeature::IsIdInWhitelist(const std::string& extension_id) const { |
520 return IsIdInList(extension_id, whitelist_); | 518 return IsIdInList(extension_id, whitelist_); |
521 } | 519 } |
522 | 520 |
523 // static | 521 // static |
524 bool SimpleFeature::IsIdInList(const std::string& extension_id, | 522 bool SimpleFeature::IsIdInList(const std::string& extension_id, |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 if (!dependency) | 562 if (!dependency) |
565 return CreateAvailability(NOT_PRESENT); | 563 return CreateAvailability(NOT_PRESENT); |
566 Availability dependency_availability = checker.Run(dependency); | 564 Availability dependency_availability = checker.Run(dependency); |
567 if (!dependency_availability.is_available()) | 565 if (!dependency_availability.is_available()) |
568 return dependency_availability; | 566 return dependency_availability; |
569 } | 567 } |
570 return CreateAvailability(IS_AVAILABLE); | 568 return CreateAvailability(IS_AVAILABLE); |
571 } | 569 } |
572 | 570 |
573 } // namespace extensions | 571 } // namespace extensions |
OLD | NEW |