#include "chrome/browser/apps/app_launch_for_metro_restart_win.h"
#include "apps/launcher.h"
-#include "apps/pref_names.h"
#include "base/bind.h"
#include "base/files/file_path.h"
#include "base/message_loop/message_loop.h"
#include "base/prefs/pref_service.h"
#include "base/time/time.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/extensions/api/app_runtime/app_runtime_api.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/common/pref_names.h"
+#include "extensions/browser/api/app_runtime/app_runtime_api.h"
#include "extensions/browser/extension_system.h"
-#include "win8/util/win8_util.h"
+#include "extensions/common/constants.h"
+using extensions::AppRuntimeEventRouter;
using extensions::Extension;
using extensions::ExtensionSystem;
if (!extension)
return;
- extensions::AppEventRouter::DispatchOnLaunchedEvent(profile, extension);
+ AppRuntimeEventRouter::DispatchOnLaunchedEvent(
+ profile, extension, extensions::SOURCE_RESTART);
}
} // namespace
prefs->ClearPref(prefs::kAppLaunchForMetroRestart);
- if (win8::IsSingleWindowMetroMode()) {
- // In this case we have relaunched with the correct profile, but we are not
- // in Desktop mode, so can not launch apps. Leave the preferences cleared so
- // there are no surprises later.
- return;
- }
-
const int kRestartAppLaunchDelayMs = 1000;
base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,