[go: nahoru, domu]

blob: 6364930d6ac6e4fe2f451834fe6624165e15376a [file] [log] [blame]
Joshua Pawlicki58a597ed2021-06-10 17:00:521// Copyright 2021 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.
4
5#include "chrome/updater/external_constants_default.h"
6
7#include "chrome/updater/constants.h"
8#include "chrome/updater/external_constants.h"
9#include "chrome/updater/updater_branding.h"
10#include "url/gurl.h"
11
12namespace updater {
13namespace {
14
15class DefaultExternalConstants : public ExternalConstants {
16 public:
17 DefaultExternalConstants() : ExternalConstants(nullptr) {}
18 ~DefaultExternalConstants() override = default;
19
20 // Overrides of ExternalConstants:
21 std::vector<GURL> UpdateURL() const override {
22 return std::vector<GURL>{GURL(UPDATE_CHECK_URL)};
23 }
24
25 bool UseCUP() const override { return true; }
26
27 double InitialDelay() const override { return kInitialDelay; }
28
29 int ServerKeepAliveSeconds() const override {
30 return kServerKeepAliveSeconds;
31 }
32};
33
34} // namespace
35
36std::unique_ptr<ExternalConstants> CreateDefaultExternalConstants() {
37 return std::make_unique<DefaultExternalConstants>();
38}
39
40} // namespace updater