Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6905)

Unified Diff: chrome/browser/signin/easy_unlock.cc

Issue 211333005: Launch easy unlock setup app from chrome://settings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/signin/easy_unlock.h ('k') | chrome/browser/signin/easy_unlock_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/browser/signin/easy_unlock.h ('k') | chrome/browser/signin/easy_unlock_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698