This source file includes following definitions.
- GetCurrentPlatform
- ConvertLocation
- CreateAvailability
#include "extensions/common/features/feature.h"
#include <map>
#include "base/command_line.h"
#include "base/lazy_instance.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
namespace extensions {
Feature::Platform Feature::GetCurrentPlatform() {
#if defined(OS_CHROMEOS)
return CHROMEOS_PLATFORM;
#elif defined(OS_LINUX)
return LINUX_PLATFORM;
#elif defined(OS_MACOSX)
return MACOSX_PLATFORM;
#elif defined(OS_WIN)
return WIN_PLATFORM;
#else
return UNSPECIFIED_PLATFORM;
#endif
}
Feature::Location Feature::ConvertLocation(Manifest::Location location) {
if (location == Manifest::COMPONENT)
return COMPONENT_LOCATION;
else
return UNSPECIFIED_LOCATION;
}
Feature::Availability Feature::CreateAvailability(AvailabilityResult result,
const std::string& message) {
return Availability(result, message);
}
Feature::Feature() : no_parent_(false) {}
Feature::~Feature() {}
}