| 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/api_feature.h" | 5 #include "extensions/common/features/api_feature.h" |
| 6 | 6 |
| 7 #include <string> |
| 8 |
| 7 namespace extensions { | 9 namespace extensions { |
| 8 | 10 |
| 9 APIFeature::APIFeature() | 11 APIFeature::APIFeature() |
| 10 : internal_(false), blocked_in_service_worker_(false) {} | 12 : internal_(false), blocked_in_service_worker_(false) {} |
| 11 | 13 |
| 12 APIFeature::~APIFeature() { | 14 APIFeature::~APIFeature() { |
| 13 } | 15 } |
| 14 | 16 |
| 15 bool APIFeature::IsInternal() const { | 17 bool APIFeature::IsInternal() const { |
| 16 return internal_; | 18 return internal_; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 28 value->GetBoolean("internal", &internal_); | 30 value->GetBoolean("internal", &internal_); |
| 29 value->GetBoolean("blocked_in_service_worker", &blocked_in_service_worker_); | 31 value->GetBoolean("blocked_in_service_worker", &blocked_in_service_worker_); |
| 30 | 32 |
| 31 if (GetContexts()->empty()) | 33 if (GetContexts()->empty()) |
| 32 return name() + ": API features must specify at least one context."; | 34 return name() + ": API features must specify at least one context."; |
| 33 | 35 |
| 34 return std::string(); | 36 return std::string(); |
| 35 } | 37 } |
| 36 | 38 |
| 37 } // namespace extensions | 39 } // namespace extensions |
| OLD | NEW |