app.setBadgeCount should return boolean

This commit is contained in:
Cheng Zhao 2016-07-01 22:18:39 +09:00
parent f8ec377123
commit 1da2a1c2ae
6 changed files with 24 additions and 11 deletions

View file

@ -47,9 +47,14 @@ bool Browser::IsDefaultProtocolClient(const std::string& protocol) {
return false;
}
void Browser::SetBadgeCount(int count) {
current_badge_count_ = count;
unity::SetDownloadCount(count);
bool Browser::SetBadgeCount(int count) {
if (IsUnityRunning()) {
unity::SetDownloadCount(count);
current_badge_count_ = count;
return true;
} else {
return false;
}
}
std::string Browser::GetExecutableFileVersion() const {