GetUsageStatsConsentCallback;
// Interface representing the platform-spacific back-end. Most of its methods
- // are blocking and should called on a background thread. There are two
+ // are blocking and should be called on a background thread. There are two
// exceptions:
// - GetState() is synchronous and called on the UI thread. It should avoid
// accessing any data members of the implementation.
// - SetConfigAndStart(), UpdateConfig() and Stop() indicate completion via
- // a callback. There methods are still can be long running and should
- // be caled on a background thread.
+ // a callback. There methods can be long running and should be caled
+ // on a background thread.
class Delegate {
public:
virtual ~Delegate() {}
// sensitive have been filtered out.
virtual scoped_ptr<base::DictionaryValue> GetConfig() = 0;
+ // Download and install the host component. |done| is invoked on the
+ // calling thread when the operation is completed.
+ virtual void InstallHost(const CompletionCallback& done) = 0;
+
// Starts the daemon process. This may require that the daemon be
// downloaded and installed. |done| is invoked on the calling thread when
// the operation is completed.
// sensitive have been filtered out.
void GetConfig(const GetConfigCallback& done);
+ // Download and install the host component. |done| is called when the
+ // operation is finished or fails.
+ void InstallHost(const CompletionCallback& done);
+
// Start the daemon process. This may require that the daemon be
// downloaded and installed. |done| is called when the
// operation is finished or fails.
// Blocking helper methods used to call the delegate.
void DoGetConfig(const GetConfigCallback& done);
+ void DoInstallHost(const CompletionCallback& done);
void DoSetConfigAndStart(scoped_ptr<base::DictionaryValue> config,
bool consent,
const CompletionCallback& done);