Commit 71e82edb authored by Xi Cheng's avatar Xi Cheng Committed by Commit Bot

Revert "Make sure kNotificationId and kAppId are mutual exclusive on Windows"

This reverts commit 44e2fc52.

Reason for revert: <CL title/description is inaccurate>

Original change's description:
> Make sure kNotificationId and kAppId are mutual exclusive on Windows
> 
> Bug: 734095
> Change-Id: I08275fff11aef97c3265a6832dc1485b4ef19b61
> Reviewed-on: https://chromium-review.googlesource.com/1038432
> Commit-Queue: Xi Cheng <chengx@chromium.org>
> Reviewed-by: Tommy Martino <tmartino@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#555986}

TBR=tmartino@chromium.org,chengx@chromium.org

Change-Id: I050712e720d65ab5b59ef67752c0c1bd3bbbbe02
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 734095
Reviewed-on: https://chromium-review.googlesource.com/1044569Reviewed-by: default avatarXi Cheng <chengx@chromium.org>
Commit-Queue: Xi Cheng <chengx@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556085}
parent 686a5f7b
...@@ -373,20 +373,6 @@ bool StartupBrowserCreatorImpl::Launch(Profile* profile, ...@@ -373,20 +373,6 @@ bool StartupBrowserCreatorImpl::Launch(Profile* profile,
DCHECK(profile); DCHECK(profile);
profile_ = profile; profile_ = profile;
#if defined(OS_WIN)
// If the command line has the kNotificationLaunchId switch, then this
// Launch() call is from notification_helper.exe to process toast activation.
// Delegate to the notification system; do not open a browser window here.
if (command_line_.HasSwitch(switches::kNotificationLaunchId)) {
DCHECK(!command_line_.HasSwitch(switches::kAppId));
if (NotificationPlatformBridgeWin::HandleActivation(command_line_)) {
RecordLaunchModeHistogram(LM_WIN_PLATFORM_NOTIFICATION);
return true;
}
return false;
}
#endif // defined(OS_WIN)
if (command_line_.HasSwitch(switches::kAppId)) { if (command_line_.HasSwitch(switches::kAppId)) {
std::string app_id = command_line_.GetSwitchValueASCII(switches::kAppId); std::string app_id = command_line_.GetSwitchValueASCII(switches::kAppId);
const Extension* extension = GetPlatformApp(profile, app_id); const Extension* extension = GetPlatformApp(profile, app_id);
...@@ -404,6 +390,19 @@ bool StartupBrowserCreatorImpl::Launch(Profile* profile, ...@@ -404,6 +390,19 @@ bool StartupBrowserCreatorImpl::Launch(Profile* profile,
} }
} }
#if defined(OS_WIN)
// If the command line has the kNotificationLaunchId switch, then this
// Launch() call is from notification_helper.exe to process toast activation.
// Delegate to the notification system; do not open a browser window here.
if (command_line_.HasSwitch(switches::kNotificationLaunchId)) {
if (NotificationPlatformBridgeWin::HandleActivation(command_line_)) {
RecordLaunchModeHistogram(LM_WIN_PLATFORM_NOTIFICATION);
return true;
}
return false;
}
#endif // defined(OS_WIN)
// Open the required browser windows and tabs. First, see if // Open the required browser windows and tabs. First, see if
// we're being run as an application window. If so, the user // we're being run as an application window. If so, the user
// opened an app shortcut. Don't restore tabs or open initial // opened an app shortcut. Don't restore tabs or open initial
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment