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

Side by Side Diff: components/update_client/configurator.h

Issue 808773005: Move most of the component updater artifacts to update_client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_CONFIGURATOR_H_ 5 #ifndef COMPONENTS_UPDATE_CLIENT_CONFIGURATOR_H_
6 #define COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_CONFIGURATOR_H_ 6 #define COMPONENTS_UPDATE_CLIENT_CONFIGURATOR_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/memory/ref_counted.h" 11 #include "base/memory/ref_counted.h"
12 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
13 13
14 class GURL; 14 class GURL;
15 15
16 namespace base { 16 namespace base {
17 class SingleThreadTaskRunner; 17 class SingleThreadTaskRunner;
18 class SequencedTaskRunner; 18 class SequencedTaskRunner;
19 class Version; 19 class Version;
20 } 20 }
21 21
22 namespace net { 22 namespace net {
23 class URLRequestContextGetter; 23 class URLRequestContextGetter;
24 } 24 }
25 25
26 namespace component_updater { 26 namespace update_client {
27 27
28 class OutOfProcessPatcher; 28 class OutOfProcessPatcher;
29 29
30 // Controls the component updater behavior. 30 // Controls the component updater behavior.
31 // TODO(sorin): this class will be split soon in two. One class controls
32 // the behavior of the update client, and the other class controls the
33 // behavior of the component updater.
31 class Configurator { 34 class Configurator {
32 public: 35 public:
33 virtual ~Configurator() {} 36 virtual ~Configurator() {}
34 37
35 // Delay in seconds from calling Start() to the first update check. 38 // Delay in seconds from calling Start() to the first update check.
36 virtual int InitialDelay() const = 0; 39 virtual int InitialDelay() const = 0;
37 40
38 // Delay in seconds to every subsequent update check. 0 means don't check. 41 // Delay in seconds to every subsequent update check. 0 means don't check.
39 // This function is a mutator for testing purposes. 42 // This function is a mutator for testing purposes.
40 virtual int NextCheckDelay() = 0; 43 virtual int NextCheckDelay() = 0;
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 virtual std::string ExtraRequestParams() const = 0; 86 virtual std::string ExtraRequestParams() const = 0;
84 87
85 // How big each update request can be. Don't go above 2000. 88 // How big each update request can be. Don't go above 2000.
86 virtual size_t UrlSizeLimit() const = 0; 89 virtual size_t UrlSizeLimit() const = 0;
87 90
88 // The source of contexts for all the url requests. 91 // The source of contexts for all the url requests.
89 virtual net::URLRequestContextGetter* RequestContext() const = 0; 92 virtual net::URLRequestContextGetter* RequestContext() const = 0;
90 93
91 // Returns a new out of process patcher. May be NULL for implementations 94 // Returns a new out of process patcher. May be NULL for implementations
92 // that patch in-process. 95 // that patch in-process.
93 virtual scoped_refptr<OutOfProcessPatcher> CreateOutOfProcessPatcher() 96 virtual scoped_refptr<update_client::OutOfProcessPatcher>
94 const = 0; 97 CreateOutOfProcessPatcher() const = 0;
95 98
96 // True means that this client can handle delta updates. 99 // True means that this client can handle delta updates.
97 virtual bool DeltasEnabled() const = 0; 100 virtual bool DeltasEnabled() const = 0;
98 101
99 // True means that the background downloader can be used for downloading 102 // True means that the background downloader can be used for downloading
100 // non on-demand components. 103 // non on-demand components.
101 virtual bool UseBackgroundDownloader() const = 0; 104 virtual bool UseBackgroundDownloader() const = 0;
102 105
103 // Gets a task runner to a blocking pool of threads suitable for worker jobs. 106 // Gets a task runner to a blocking pool of threads suitable for worker jobs.
104 virtual scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner() 107 virtual scoped_refptr<base::SequencedTaskRunner> GetSequencedTaskRunner()
105 const = 0; 108 const = 0;
106 109
107 // Gets a task runner for worker jobs guaranteed to run on a single thread. 110 // Gets a task runner for worker jobs guaranteed to run on a single thread.
108 // This thread must be capable of IO. On Windows, this thread must be 111 // This thread must be capable of IO. On Windows, this thread must be
109 // initialized for use of COM objects. 112 // initialized for use of COM objects.
110 virtual scoped_refptr<base::SingleThreadTaskRunner> 113 virtual scoped_refptr<base::SingleThreadTaskRunner>
111 GetSingleThreadTaskRunner() const = 0; 114 GetSingleThreadTaskRunner() const = 0;
112 }; 115 };
113 116
114 } // namespace component_updater 117 } // namespace update_client
115 118
116 #endif // COMPONENTS_COMPONENT_UPDATER_COMPONENT_UPDATER_CONFIGURATOR_H_ 119 #endif // COMPONENTS_UPDATE_CLIENT_CONFIGURATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698