2013-06-02 12:23:04 +00:00
|
|
|
// Copyright (c) 2013 GitHub, Inc. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef ATOM_BROWSER_AUTO_UPDATER_DELEGATE_H_
|
|
|
|
#define ATOM_BROWSER_AUTO_UPDATER_DELEGATE_H_
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "base/callback_forward.h"
|
|
|
|
|
2014-01-21 14:13:34 +00:00
|
|
|
namespace base {
|
|
|
|
class Time;
|
|
|
|
}
|
|
|
|
|
2013-06-02 12:23:04 +00:00
|
|
|
namespace auto_updater {
|
|
|
|
|
|
|
|
class AutoUpdaterDelegate {
|
|
|
|
public:
|
2014-01-21 14:50:46 +00:00
|
|
|
// An error happened.
|
|
|
|
virtual void OnError(const std::string& error) {}
|
|
|
|
|
|
|
|
// There is no available update.
|
|
|
|
virtual void OnUpdateNotAvailable() {}
|
|
|
|
|
2014-01-21 14:13:34 +00:00
|
|
|
// There is a new update which has been downloaded.
|
|
|
|
virtual void OnUpdateDownloaded(const std::string& release_notes,
|
|
|
|
const std::string& release_name,
|
|
|
|
const base::Time& release_date,
|
|
|
|
const std::string& update_url,
|
|
|
|
const base::Closure& quit_and_install) {}
|
2013-06-03 13:51:46 +00:00
|
|
|
|
2013-06-02 12:23:04 +00:00
|
|
|
protected:
|
|
|
|
virtual ~AutoUpdaterDelegate() {}
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace auto_updater
|
|
|
|
|
|
|
|
#endif // ATOM_BROWSER_AUTO_UPDATER_DELEGATE_H_
|