blob: 2fa257fffd2252f0143927cfa5a8c1f6b864abb7 [file] [log] [blame]
// Copyright 2021 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/updater/external_constants_default.h"
#include "base/memory/scoped_refptr.h"
#include "chrome/updater/constants.h"
#include "chrome/updater/external_constants.h"
#include "chrome/updater/updater_branding.h"
#include "components/crx_file/crx_verifier.h"
#include "url/gurl.h"
namespace updater {
namespace {
class DefaultExternalConstants : public ExternalConstants {
public:
DefaultExternalConstants() : ExternalConstants(nullptr) {}
// Overrides of ExternalConstants:
std::vector<GURL> UpdateURL() const override {
return std::vector<GURL>{GURL(UPDATE_CHECK_URL)};
}
bool UseCUP() const override { return true; }
double InitialDelay() const override { return kInitialDelay; }
int ServerKeepAliveSeconds() const override {
return kServerKeepAliveSeconds;
}
crx_file::VerifierFormat CrxVerifierFormat() const override {
return crx_file::VerifierFormat::CRX3_WITH_PUBLISHER_PROOF;
}
private:
~DefaultExternalConstants() override = default;
};
} // namespace
scoped_refptr<ExternalConstants> CreateDefaultExternalConstants() {
return base::MakeRefCounted<DefaultExternalConstants>();
}
} // namespace updater