1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "extensions/common/features/feature.h"
9 #include "base/command_line.h"
10 #include "base/lazy_instance.h"
11 #include "base/strings/string_util.h"
12 #include "base/strings/stringprintf.h"
13 #include "extensions/common/extension.h"
15 namespace extensions
{
18 Feature::Platform
Feature::GetCurrentPlatform() {
19 #if defined(OS_CHROMEOS)
20 return CHROMEOS_PLATFORM
;
21 #elif defined(OS_LINUX)
22 return LINUX_PLATFORM
;
23 #elif defined(OS_MACOSX)
24 return MACOSX_PLATFORM
;
28 return UNSPECIFIED_PLATFORM
;
33 Feature::Availability
Feature::CreateAvailability(AvailabilityResult result
,
34 const std::string
& message
) {
35 return Availability(result
, message
);
38 Feature::Availability
Feature::IsAvailableToExtension(
39 const Extension
* extension
) {
40 return IsAvailableToManifest(extension
->id(),
42 extension
->location(),
43 extension
->manifest_version());
46 Feature::Feature() : no_parent_(false) {}
48 Feature::~Feature() {}
50 } // namespace extensions