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"
14 namespace extensions {
17 Feature::Platform Feature::GetCurrentPlatform() {
18 #if defined(OS_CHROMEOS)
19 return CHROMEOS_PLATFORM;
20 #elif defined(OS_LINUX)
21 return LINUX_PLATFORM;
22 #elif defined(OS_MACOSX)
23 return MACOSX_PLATFORM;
27 return UNSPECIFIED_PLATFORM;
32 Feature::Location Feature::ConvertLocation(Manifest::Location location) {
33 if (location == Manifest::COMPONENT)
34 return COMPONENT_LOCATION;
36 return UNSPECIFIED_LOCATION;
40 Feature::Availability Feature::CreateAvailability(AvailabilityResult result,
41 const std::string& message) {
42 return Availability(result, message);
45 Feature::Feature() : no_parent_(false) {}
47 Feature::~Feature() {}
49 } // namespace extensions