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

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

Issue 2873533002: Prepare to abstract PersistedData by making it part of the configurator.
Patch Set: Really fix a compile error in iOS component configurator this time. Created 3 years, 7 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_UPDATE_CLIENT_CONFIGURATOR_H_ 5 #ifndef COMPONENTS_UPDATE_CLIENT_CONFIGURATOR_H_
6 #define COMPONENTS_UPDATE_CLIENT_CONFIGURATOR_H_ 6 #define COMPONENTS_UPDATE_CLIENT_CONFIGURATOR_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 13
14 class GURL; 14 class GURL;
15 class PrefService; 15 class PrefService;
16 16
17 namespace base { 17 namespace base {
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 update_client { 26 namespace update_client {
27 27
28 class OutOfProcessPatcher; 28 class OutOfProcessPatcher;
29 class PersistedData;
29 30
30 // Controls the component updater behavior. 31 // Controls the component updater behavior.
31 // TODO(sorin): this class will be split soon in two. One class controls 32 // 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 // the behavior of the update client, and the other class controls the
33 // behavior of the component updater. 34 // behavior of the component updater.
34 class Configurator : public base::RefCountedThreadSafe<Configurator> { 35 class Configurator : public base::RefCountedThreadSafe<Configurator> {
35 public: 36 public:
36 // Delay in seconds from calling Start() to the first update check. 37 // Delay in seconds from calling Start() to the first update check.
37 virtual int InitialDelay() const = 0; 38 virtual int InitialDelay() const = 0;
38 39
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 // on. 127 // on.
127 // Returning null is safe and will disable any functionality that requires 128 // Returning null is safe and will disable any functionality that requires
128 // persistent storage. 129 // persistent storage.
129 virtual PrefService* GetPrefService() const = 0; 130 virtual PrefService* GetPrefService() const = 0;
130 131
131 // Returns true if the Chrome is installed for the current user only, or false 132 // Returns true if the Chrome is installed for the current user only, or false
132 // if Chrome is installed for all users on the machine. This function must be 133 // if Chrome is installed for all users on the machine. This function must be
133 // called only from a blocking pool thread, as it may access the file system. 134 // called only from a blocking pool thread, as it may access the file system.
134 virtual bool IsPerUserInstall() const = 0; 135 virtual bool IsPerUserInstall() const = 0;
135 136
137 // Returns a PersistedData object that update_client can use to store
138 // persistent update information. Note that the caller is responsbile to
139 // release the object.
140 virtual PersistedData* CreateMetadata() const = 0;
141
136 protected: 142 protected:
137 friend class base::RefCountedThreadSafe<Configurator>; 143 friend class base::RefCountedThreadSafe<Configurator>;
138 144
139 virtual ~Configurator() {} 145 virtual ~Configurator() {}
140 }; 146 };
141 147
142 } // namespace update_client 148 } // namespace update_client
143 149
144 #endif // COMPONENTS_UPDATE_CLIENT_CONFIGURATOR_H_ 150 #endif // COMPONENTS_UPDATE_CLIENT_CONFIGURATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698