#ifndef ATOM_BROWSER_AUTO_UPDATER_H_
#define ATOM_BROWSER_AUTO_UPDATER_H_
+#include <string>
+
#include "base/basictypes.h"
namespace auto_updater {
static void Init();
+ static void SetFeedURL(const std::string& url);
static void SetAutomaticallyChecksForUpdates(bool yes);
static void SetAutomaticallyDownloadsUpdates(bool yes);
+ static void CheckForUpdates();
static void CheckForUpdatesInBackground();
private:
}
// static
+void AutoUpdater::SetFeedURL(const std::string& url) {
+ NSString* url_str(base::SysUTF8ToNSString(url));
+ [[SUUpdater sharedUpdater] setFeedURL:[NSURL URLWithString:url_str]];
+}
+
+// static
void AutoUpdater::SetAutomaticallyChecksForUpdates(bool yes) {
[[SUUpdater sharedUpdater] setAutomaticallyChecksForUpdates:yes];
}
}
// static
+void AutoUpdater::CheckForUpdates() {
+ [[SUUpdater sharedUpdater] checkForUpdates:[SUUpdater sharedUpdater]];
+}
+
+// static
void AutoUpdater::CheckForUpdatesInBackground() {
[[SUUpdater sharedUpdater] checkForUpdatesInBackground];
}