#ifndef CHROME_BROWSER_COMPONENT_UPDATER_UPDATE_CHECKER_H_
#define CHROME_BROWSER_COMPONENT_UPDATER_UPDATE_CHECKER_H_
#include <string>
#include <vector>
#include "base/basictypes.h"
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/component_updater/update_response.h"
class GURL;
namespace net {
class URLRequestContextGetter;
}
namespace component_updater {
struct CrxUpdateItem;
class UpdateChecker {
public:
typedef base::Callback<void (int error, const std::string& error_message,
const UpdateResponse::Results& results)> UpdateCheckCallback;
virtual ~UpdateChecker() {}
virtual bool CheckForUpdates(
const std::vector<CrxUpdateItem*>& items_to_check,
const std::string& additional_attributes) = 0;
static scoped_ptr<UpdateChecker> Create(
const GURL& url,
net::URLRequestContextGetter* url_request_context_getter,
const UpdateCheckCallback& update_check_callback);
protected:
UpdateChecker() {}
private:
DISALLOW_COPY_AND_ASSIGN(UpdateChecker);
};
}
#endif