chore: change return type of platform_util::SetLoginItemEnabled (#15854)
This commit is contained in:
parent
5f9c857eb0
commit
73fbb69c50
3 changed files with 6 additions and 4 deletions
|
@ -278,7 +278,9 @@ void RemoveFromLoginItems() {
|
|||
|
||||
void Browser::SetLoginItemSettings(LoginItemSettings settings) {
|
||||
#if defined(MAS_BUILD)
|
||||
platform_util::SetLoginItemEnabled(settings.open_at_login);
|
||||
if (!platform_util::SetLoginItemEnabled(settings.open_at_login)) {
|
||||
LOG(ERROR) << "Unable to set login item enabled on sandboxed app.";
|
||||
}
|
||||
#else
|
||||
if (settings.open_at_login)
|
||||
base::mac::AddToLoginItems(settings.open_as_hidden);
|
||||
|
|
|
@ -61,7 +61,7 @@ void Beep();
|
|||
|
||||
#if defined(OS_MACOSX)
|
||||
bool GetLoginItemEnabled();
|
||||
void SetLoginItemEnabled(bool enabled);
|
||||
bool SetLoginItemEnabled(bool enabled);
|
||||
#endif
|
||||
|
||||
#if defined(OS_LINUX)
|
||||
|
|
|
@ -199,9 +199,9 @@ bool GetLoginItemEnabled() {
|
|||
return enabled;
|
||||
}
|
||||
|
||||
void SetLoginItemEnabled(bool enabled) {
|
||||
bool SetLoginItemEnabled(bool enabled) {
|
||||
NSString* identifier = GetLoginHelperBundleIdentifier();
|
||||
SMLoginItemSetEnabled((__bridge CFStringRef)identifier, enabled);
|
||||
return SMLoginItemSetEnabled((__bridge CFStringRef)identifier, enabled);
|
||||
}
|
||||
|
||||
} // namespace platform_util
|
||||
|
|
Loading…
Add table
Reference in a new issue