OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 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 #ifndef EXTENSIONS_BROWSER_UPDATER_UPDATE_CLIENT_CONFIG_H_ |
| 6 #define EXTENSIONS_BROWSER_UPDATER_UPDATE_CLIENT_CONFIG_H_ |
| 7 |
| 8 #include <string> |
| 9 #include <vector> |
| 10 |
| 11 #include "base/memory/ref_counted.h" |
| 12 #include "components/update_client/configurator.h" |
| 13 |
| 14 class GURL; |
| 15 |
| 16 namespace base { |
| 17 class SequencedTaskRunner; |
| 18 class SingleThreadTaskRunner; |
| 19 } |
| 20 |
| 21 namespace content { |
| 22 class BrowserContext; |
| 23 } |
| 24 |
| 25 namespace update_client { |
| 26 class OutOfProcessPatcher; |
| 27 } |
| 28 |
| 29 namespace extensions { |
| 30 |
| 31 // Used to provide configuration settings to the UpdateClient. |
| 32 class UpdateClientConfig : public update_client::Configurator { |
| 33 public: |
| 34 explicit UpdateClientConfig(content::BrowserContext* context); |
| 35 |
| 36 int InitialDelay() const override; |
| 37 int NextCheckDelay() const override; |
| 38 int StepDelay() const override; |
| 39 int OnDemandDelay() const override; |
| 40 int UpdateDelay() const override; |
| 41 std::string GetOSLongName() const override; |
| 42 std::string ExtraRequestParams() const override; |
| 43 |
| 44 net::URLRequestContextGetter* RequestContext() const override; |
| 45 |
| 46 scoped_refptr<update_client::OutOfProcessPatcher> CreateOutOfProcessPatcher() |
| 47 const override; |
| 48 |
| 49 bool DeltasEnabled() const override; |
| 50 |
| 51 bool UseBackgroundDownloader() const override; |
| 52 |
| 53 scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner() |
| 54 const override; |
| 55 |
| 56 scoped_refptr<base::SingleThreadTaskRunner> GetSingleThreadTaskRunner() |
| 57 const override; |
| 58 |
| 59 protected: |
| 60 friend class base::RefCountedThreadSafe<UpdateClientConfig>; |
| 61 ~UpdateClientConfig() override; |
| 62 |
| 63 private: |
| 64 content::BrowserContext* context_; |
| 65 |
| 66 DISALLOW_COPY_AND_ASSIGN(UpdateClientConfig); |
| 67 }; |
| 68 |
| 69 } // namespace extensions |
| 70 |
| 71 #endif // EXTENSIONS_BROWSER_UPDATER_UPDATE_CLIENT_CONFIG_H_ |
OLD | NEW |