blob: ca99b897b44f27a07ecc8969006ebf31bd257cdb [file] [log] [blame]
// Copyright 2019 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/browser/web_applications/components/web_app_constants.h"
namespace web_app {
static_assert(Source::kMinValue == 0, "Source enum should be zero based");
const char* LaunchContainerEnumToStr(LaunchContainer launch_container) {
switch (launch_container) {
case LaunchContainer::kDefault:
return "default";
case LaunchContainer::kTab:
return "tab";
case LaunchContainer::kWindow:
return "window";
}
}
bool IsSuccess(InstallResultCode code) {
return code == InstallResultCode::kSuccessNewInstall ||
code == InstallResultCode::kSuccessAlreadyInstalled;
}
} // namespace web_app