~tatokis/unity/gcc-72-errors

« back to all changes in this revision

Viewing changes to lockscreen/LockScreenController.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:
27
27
#include "LockScreenPromptFactory.h"
28
28
#include "LockScreenShield.h"
29
29
#include "LockScreenSettings.h"
 
30
#include "UserAuthenticatorPam.h"
30
31
#include "unity-shared/AnimationUtils.h"
31
32
#include "unity-shared/InputMonitor.h"
32
33
#include "unity-shared/UnitySettings.h"
70
71
  , upstart_wrapper_(upstart_wrapper)
71
72
  , shield_factory_(shield_factory)
72
73
  , suspend_inhibitor_manager_(std::make_shared<SuspendInhibitorManager>())
 
74
  , user_authenticator_(std::make_shared<UserAuthenticatorPam>())
73
75
  , fade_animator_(unity::Settings::Instance().low_gfx() ? 0 : LOCK_FADE_DURATION)
74
76
  , blank_window_animator_(IDLE_FADE_DURATION)
75
77
  , test_mode_(test_mode)
259
261
 
260
262
  if (!prompt_view)
261
263
  {
262
 
    prompt_view = test_mode_ ? nux::ObjectPtr<AbstractUserPromptView>() : PromptFactory::CreatePrompt(session_manager_);
 
264
    prompt_view = test_mode_ ? nux::ObjectPtr<AbstractUserPromptView>() : PromptFactory::CreatePrompt(session_manager_, user_authenticator_);
263
265
    prompt_view_ = prompt_view.GetPointer();
264
266
  }
265
267