Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(144)

Side by Side Diff: components/component_updater/default_configurator.h

Issue 1281913002: Componentize ComponentUpdaterConfigurator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 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 COMPONENTS_COMPONENT_UPDATER_DEFAULT_CONFIGURATOR_H_
6 #define COMPONENTS_COMPONENT_UPDATER_DEFAULT_CONFIGURATOR_H_
7
8 #include "components/update_client/configurator.h"
9 #include "url/gurl.h"
10
11 namespace base {
12 class CommandLine;
13 }
14
15 namespace component_updater {
16
17 // Default partial implementation of update_client::Configurator that can be
18 // used both on iOS and other platforms.
19 class DefaultConfigurator : public update_client::Configurator {
20 public:
21 DefaultConfigurator(const base::CommandLine* cmdline,
22 net::URLRequestContextGetter* url_request_getter);
23
24 int InitialDelay() const override;
25 int NextCheckDelay() const override;
26 int StepDelay() const override;
27 int OnDemandDelay() const override;
28 int UpdateDelay() const override;
29 std::vector<GURL> UpdateUrl() const override;
30 std::vector<GURL> PingUrl() const override;
31 base::Version GetBrowserVersion() const override;
32 std::string GetOSLongName() const override;
33 std::string ExtraRequestParams() const override;
34 net::URLRequestContextGetter* RequestContext() const override;
35 bool DeltasEnabled() const override;
36 bool UseBackgroundDownloader() const override;
37
38 protected:
39 ~DefaultConfigurator() override {}
40
41 private:
42 friend class base::RefCountedThreadSafe<DefaultConfigurator>;
43
44 net::URLRequestContextGetter* url_request_getter_;
45 std::string extra_info_;
46 GURL url_source_override_;
47 bool fast_update_;
48 bool pings_enabled_;
49 bool deltas_enabled_;
50 bool background_downloads_enabled_;
51 bool fallback_to_alt_source_url_enabled_;
52 };
53
54 } // namespace component_updater
55
56 #endif // COMPONENTS_COMPONENT_UPDATER_DEFAULT_CONFIGURATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698