chromium/extensions/common/constants.cc

// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "extensions/common/constants.h"

#include <string_view>

#include "base/containers/contains.h"
#include "base/containers/fixed_flat_set.h"
#include "build/build_config.h"
#include "build/chromecast_buildflags.h"
#include "build/chromeos_buildflags.h"

namespace extensions {

const uint8_t kWebstoreSignaturesPublicKey[] =;

const size_t kWebstoreSignaturesPublicKeySize =;

}  // namespace extensions

namespace extension_misc {

#if BUILDFLAG(IS_CHROMEOS)
// TODO(michaelpg): Deprecate old app IDs before adding new ones to avoid bloat.
constexpr char kStagingAttractLoopAppId[] = "aefaeciooibphdopnjjmgjdlckdcfbae";
constexpr char kStagingHighlightsAppId[] = "glochkamldfopmdlegmcnjmgkopfiplb";

// Specialized demo apps for blazey devices
constexpr char kBlazeyAttractLoopAppId[] = "lceekekmpiieklnpocjfahfakahjkhha";
constexpr char kBlazeyHighlightsAppId[] = "jbpnmbcpgemgfblnjfhnmlffhkofekmf";

bool IsDemoModeChromeApp(std::string_view extension_id) {
  constexpr auto kDemoModeApps = base::MakeFixedFlatSet<std::string_view>({
      // clang-format off
      kHighlightsAppId,
      kScreensaverAppId,
      kStagingAttractLoopAppId,
      kStagingHighlightsAppId,
      kNewAttractLoopAppId,
      kNewHighlightsAppId,
      kBlazeyAttractLoopAppId,
      kBlazeyHighlightsAppId
      // clang-format on
  });
  return base::Contains(kDemoModeApps, extension_id);
}
#endif  // BUILDFLAG(IS_CHROMEOS)

#if BUILDFLAG(IS_CHROMEOS_ASH)

bool IsSystemUIApp(std::string_view extension_id) {
  constexpr auto kApps = base::MakeFixedFlatSet<std::string_view>({
      // clang-format off
      kChromeVoxExtensionId,
      kFilesManagerAppId,
      kHighlightsAppId,
      kScreensaverAppId,
      // clang-format on
  });
  return base::Contains(kApps, extension_id);
}

#endif  // BUILDFLAG(IS_CHROMEOS_ASH)

bool IsQuickOfficeExtension(std::string_view extension_id) {}

// TODO(crbug.com/40796281): remove after default app migration is done.
bool IsPreinstalledAppId(std::string_view app_id) {}

}  // namespace extension_misc