~tatokis/unity/gcc-72-errors

« back to all changes in this revision

Viewing changes to lockscreen/LockScreenPromptFactory.cpp

  • Committer: Bileto Bot
  • Author(s): Andrea Azzarone
  • Date: 2017-09-25 16:03:52 UTC
  • mfrom: (4253.3.3 fix-missing-entry-lockscreen)
  • Revision ID: ci-train-bot@canonical.com-20170925160352-kqd3v7i3wdwhixjn
Refactor the way UserAuthenticator is created and passed around. Handle failures to create new threads and fallback to a "Switch to greeter..." button in case of failure. (LP: #1311316)

Approved by: Marco Trevisan (Treviño)

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
{
27
27
namespace lockscreen
28
28
{
29
 
nux::ObjectPtr<AbstractUserPromptView> PromptFactory::CreatePrompt(session::Manager::Ptr const& sm)
 
29
nux::ObjectPtr<AbstractUserPromptView> PromptFactory::CreatePrompt(session::Manager::Ptr const& sm,
 
30
                                                                   UserAuthenticator::Ptr const& ua)
30
31
{
31
32
  nux::ObjectPtr<AbstractUserPromptView> prompt;
32
33
 
33
34
  if (unity::Settings::Instance().desktop_type() == DesktopType::UBUNTUKYLIN)
34
 
    prompt = new KylinUserPromptView(sm);
 
35
    prompt = new KylinUserPromptView(sm, ua);
35
36
  else
36
 
    prompt = new UserPromptView(sm);
 
37
    prompt = new UserPromptView(sm, ua);
37
38
 
38
39
  return prompt;
39
40
}