| Index: chrome/browser/signin/easy_unlock.cc
|
| diff --git a/chrome/browser/signin/easy_unlock_controller.cc b/chrome/browser/signin/easy_unlock.cc
|
| similarity index 52%
|
| rename from chrome/browser/signin/easy_unlock_controller.cc
|
| rename to chrome/browser/signin/easy_unlock.cc
|
| index d19a6d04645c8151f01fe3026fcf065d241abfe5..bf79edcd0d403783717fdebdd44bc098cdc6a517 100644
|
| --- a/chrome/browser/signin/easy_unlock_controller.cc
|
| +++ b/chrome/browser/signin/easy_unlock.cc
|
| @@ -2,14 +2,19 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "chrome/browser/signin/easy_unlock_controller.h"
|
| +#include "chrome/browser/signin/easy_unlock.h"
|
|
|
| #include "base/values.h"
|
| +#include "chrome/browser/extensions/extension_service.h"
|
| +#include "chrome/browser/profiles/profile.h"
|
| +#include "chrome/browser/ui/extensions/application_launch.h"
|
| #include "chrome/common/pref_names.h"
|
| #include "components/user_prefs/pref_registry_syncable.h"
|
| +#include "extensions/browser/extension_system.h"
|
|
|
| -// static.
|
| -void EasyUnlockController::RegisterProfilePrefs(
|
| +namespace easy_unlock {
|
| +
|
| +void RegisterProfilePrefs(
|
| user_prefs::PrefRegistrySyncable* registry) {
|
| registry->RegisterBooleanPref(
|
| prefs::kEasyUnlockEnabled,
|
| @@ -24,3 +29,15 @@ void EasyUnlockController::RegisterProfilePrefs(
|
| new base::DictionaryValue(),
|
| user_prefs::PrefRegistrySyncable::UNSYNCABLE_PREF);
|
| }
|
| +
|
| +void LaunchEasyUnlockSetup(Profile* profile) {
|
| + ExtensionService* service =
|
| + extensions::ExtensionSystem::Get(profile)->extension_service();
|
| + const extensions::Extension* extension =
|
| + service->GetExtensionById(extension_misc::kEasyUnlockAppId, false);
|
| +
|
| + OpenApplication(AppLaunchParams(
|
| + profile, extension, extensions::LAUNCH_CONTAINER_WINDOW, NEW_WINDOW));
|
| +}
|
| +
|
| +} // namespace easy_unlock
|
|
|