Add a few more methods for AutoUpdater.
This commit is contained in:
parent
08dbdd9718
commit
e4d2368908
2 changed files with 15 additions and 0 deletions
|
@ -5,6 +5,8 @@
|
||||||
#ifndef ATOM_BROWSER_AUTO_UPDATER_H_
|
#ifndef ATOM_BROWSER_AUTO_UPDATER_H_
|
||||||
#define ATOM_BROWSER_AUTO_UPDATER_H_
|
#define ATOM_BROWSER_AUTO_UPDATER_H_
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#include "base/basictypes.h"
|
#include "base/basictypes.h"
|
||||||
|
|
||||||
namespace auto_updater {
|
namespace auto_updater {
|
||||||
|
@ -19,8 +21,10 @@ class AutoUpdater {
|
||||||
|
|
||||||
static void Init();
|
static void Init();
|
||||||
|
|
||||||
|
static void SetFeedURL(const std::string& url);
|
||||||
static void SetAutomaticallyChecksForUpdates(bool yes);
|
static void SetAutomaticallyChecksForUpdates(bool yes);
|
||||||
static void SetAutomaticallyDownloadsUpdates(bool yes);
|
static void SetAutomaticallyDownloadsUpdates(bool yes);
|
||||||
|
static void CheckForUpdates();
|
||||||
static void CheckForUpdatesInBackground();
|
static void CheckForUpdatesInBackground();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -71,6 +71,12 @@ void AutoUpdater::Init() {
|
||||||
[[SUUpdater sharedUpdater] setDelegate:delegate];
|
[[SUUpdater sharedUpdater] setDelegate:delegate];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// static
|
||||||
|
void AutoUpdater::SetFeedURL(const std::string& url) {
|
||||||
|
NSString* url_str(base::SysUTF8ToNSString(url));
|
||||||
|
[[SUUpdater sharedUpdater] setFeedURL:[NSURL URLWithString:url_str]];
|
||||||
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void AutoUpdater::SetAutomaticallyChecksForUpdates(bool yes) {
|
void AutoUpdater::SetAutomaticallyChecksForUpdates(bool yes) {
|
||||||
[[SUUpdater sharedUpdater] setAutomaticallyChecksForUpdates:yes];
|
[[SUUpdater sharedUpdater] setAutomaticallyChecksForUpdates:yes];
|
||||||
|
@ -81,6 +87,11 @@ void AutoUpdater::SetAutomaticallyDownloadsUpdates(bool yes) {
|
||||||
[[SUUpdater sharedUpdater] setAutomaticallyDownloadsUpdates:yes];
|
[[SUUpdater sharedUpdater] setAutomaticallyDownloadsUpdates:yes];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// static
|
||||||
|
void AutoUpdater::CheckForUpdates() {
|
||||||
|
[[SUUpdater sharedUpdater] checkForUpdates:[SUUpdater sharedUpdater]];
|
||||||
|
}
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void AutoUpdater::CheckForUpdatesInBackground() {
|
void AutoUpdater::CheckForUpdatesInBackground() {
|
||||||
[[SUUpdater sharedUpdater] checkForUpdatesInBackground];
|
[[SUUpdater sharedUpdater] checkForUpdatesInBackground];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue