| Index: chrome/common/extensions/features/permission_feature.cc
|
| diff --git a/chrome/common/extensions/features/permission_feature.cc b/chrome/common/extensions/features/permission_feature.cc
|
| deleted file mode 100644
|
| index c4477aa89ea9a227b19ced9dfbd9a639fa3e1d20..0000000000000000000000000000000000000000
|
| --- a/chrome/common/extensions/features/permission_feature.cc
|
| +++ /dev/null
|
| @@ -1,52 +0,0 @@
|
| -// Copyright (c) 2012 The Chromium Authors. All rights reserved.
|
| -// Use of this source code is governed by a BSD-style license that can be
|
| -// found in the LICENSE file.
|
| -
|
| -#include "chrome/common/extensions/features/permission_feature.h"
|
| -
|
| -#include "extensions/common/permissions/permission_set.h"
|
| -#include "extensions/common/permissions/permissions_data.h"
|
| -
|
| -namespace extensions {
|
| -
|
| -PermissionFeature::PermissionFeature() {
|
| -}
|
| -
|
| -PermissionFeature::~PermissionFeature() {
|
| -}
|
| -
|
| -Feature::Availability PermissionFeature::IsAvailableToContext(
|
| - const Extension* extension,
|
| - Feature::Context context,
|
| - const GURL& url,
|
| - Feature::Platform platform) const {
|
| - Availability availability = SimpleFeature::IsAvailableToContext(extension,
|
| - context,
|
| - url,
|
| - platform);
|
| - if (!availability.is_available())
|
| - return availability;
|
| -
|
| - if (extension && !PermissionsData::HasAPIPermission(extension, name()))
|
| - return CreateAvailability(NOT_PRESENT, extension->GetType());
|
| -
|
| - return CreateAvailability(IS_AVAILABLE);
|
| -}
|
| -
|
| -std::string PermissionFeature::Parse(const base::DictionaryValue* value) {
|
| - std::string error = SimpleFeature::Parse(value);
|
| - if (!error.empty())
|
| - return error;
|
| -
|
| - if (extension_types()->empty()) {
|
| - return name() + ": Permission features must specify at least one " +
|
| - "value for extension_types.";
|
| - }
|
| -
|
| - if (!GetContexts()->empty())
|
| - return name() + ": Permission features do not support contexts.";
|
| -
|
| - return std::string();
|
| -}
|
| -
|
| -} // namespace extensions
|
|
|