mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
Bug 844331 - part 5 - add profile-before-change2 notification; r=bsmedberg
This commit is contained in:
parent
b4470eda85
commit
cdcd9fd8f3
@ -108,6 +108,7 @@ PowerManagerService::SyncProfile()
|
||||
obsServ->NotifyObservers(nullptr, "profile-change-net-teardown", context.get());
|
||||
obsServ->NotifyObservers(nullptr, "profile-change-teardown", context.get());
|
||||
obsServ->NotifyObservers(nullptr, "profile-before-change", context.get());
|
||||
obsServ->NotifyObservers(nullptr, "profile-before-change2", context.get());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -130,6 +130,7 @@ nsProfileDirServiceProvider::Shutdown()
|
||||
|
||||
NS_NAMED_LITERAL_STRING(context, "shutdown-persist");
|
||||
observerService->NotifyObservers(nullptr, "profile-before-change", context.get());
|
||||
observerService->NotifyObservers(nullptr, "profile-before-change2", context.get());
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -867,6 +867,7 @@ nsXREDirProvider::DoShutdown()
|
||||
|
||||
// Phase 3: Notify observers of a profile change
|
||||
obsSvc->NotifyObservers(nullptr, "profile-before-change", kShutdownPersist);
|
||||
obsSvc->NotifyObservers(nullptr, "profile-before-change2", kShutdownPersist);
|
||||
}
|
||||
mProfileNotified = false;
|
||||
}
|
||||
|
@ -377,6 +377,7 @@ nsAppShell::ProcessNextNativeEvent(bool mayWait)
|
||||
obsServ->NotifyObservers(nullptr, "profile-change-net-teardown", context.get());
|
||||
obsServ->NotifyObservers(nullptr, "profile-change-teardown", context.get());
|
||||
obsServ->NotifyObservers(nullptr, "profile-before-change", context.get());
|
||||
obsServ->NotifyObservers(nullptr, "profile-before-change2", context.get());
|
||||
nsCOMPtr<nsIAppStartup> appSvc = do_GetService("@mozilla.org/toolkit/app-startup;1");
|
||||
if (appSvc)
|
||||
appSvc->Quit(nsIAppStartup::eForceQuit);
|
||||
|
@ -4564,6 +4564,7 @@ bool nsWindow::ProcessMessage(UINT msg, WPARAM &wParam, LPARAM &lParam,
|
||||
obsServ->NotifyObservers(nullptr, "profile-change-net-teardown", context.get());
|
||||
obsServ->NotifyObservers(nullptr, "profile-change-teardown", context.get());
|
||||
obsServ->NotifyObservers(nullptr, "profile-before-change", context.get());
|
||||
obsServ->NotifyObservers(nullptr, "profile-before-change2", context.get());
|
||||
// Then a controlled but very quick exit.
|
||||
_exit(0);
|
||||
}
|
||||
|
@ -128,6 +128,7 @@ class ScopedXPCOM : public nsIDirectoryServiceProvider2
|
||||
MOZ_ALWAYS_TRUE(NS_SUCCEEDED(os->NotifyObservers(nullptr, "profile-change-net-teardown", nullptr)));
|
||||
MOZ_ALWAYS_TRUE(NS_SUCCEEDED(os->NotifyObservers(nullptr, "profile-change-teardown", nullptr)));
|
||||
MOZ_ALWAYS_TRUE(NS_SUCCEEDED(os->NotifyObservers(nullptr, "profile-before-change", nullptr)));
|
||||
MOZ_ALWAYS_TRUE(NS_SUCCEEDED(os->NotifyObservers(nullptr, "profile-before-change2", nullptr)));
|
||||
}
|
||||
|
||||
if (NS_FAILED(mProfD->Remove(true))) {
|
||||
|
Loading…
Reference in New Issue
Block a user