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

Side by Side Diff: chrome/browser/signin/easy_unlock_service_regular.cc

Issue 720633003: Revert of CL 722703002 due to build breakage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: revert Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/signin/easy_unlock_service_regular.h" 5 #include "chrome/browser/signin/easy_unlock_service_regular.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
11 #include "base/prefs/scoped_user_pref_update.h" 11 #include "base/prefs/scoped_user_pref_update.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "chrome/browser/extensions/extension_service.h" 13 #include "chrome/browser/extensions/extension_service.h"
14 #include "chrome/browser/profiles/profile.h" 14 #include "chrome/browser/profiles/profile.h"
15 #include "chrome/browser/signin/easy_unlock_toggle_flow.h" 15 #include "chrome/browser/signin/easy_unlock_toggle_flow.h"
16 #include "chrome/browser/signin/screenlock_bridge.h" 16 #include "chrome/browser/signin/screenlock_bridge.h"
17 #include "chrome/browser/ui/extensions/app_launch_params.h"
18 #include "chrome/browser/ui/extensions/application_launch.h" 17 #include "chrome/browser/ui/extensions/application_launch.h"
19 #include "chrome/common/extensions/extension_constants.h" 18 #include "chrome/common/extensions/extension_constants.h"
20 #include "chrome/common/pref_names.h" 19 #include "chrome/common/pref_names.h"
21 #include "components/pref_registry/pref_registry_syncable.h" 20 #include "components/pref_registry/pref_registry_syncable.h"
22 #include "content/public/browser/browser_thread.h" 21 #include "content/public/browser/browser_thread.h"
23 #include "extensions/browser/extension_system.h" 22 #include "extensions/browser/extension_system.h"
24 #include "extensions/common/constants.h"
25 23
26 #if defined(OS_CHROMEOS) 24 #if defined(OS_CHROMEOS)
27 #include "apps/app_lifetime_monitor_factory.h" 25 #include "apps/app_lifetime_monitor_factory.h"
28 #include "base/thread_task_runner_handle.h" 26 #include "base/thread_task_runner_handle.h"
29 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.h" 27 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_key_manager.h"
30 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_reauth.h" 28 #include "chrome/browser/chromeos/login/easy_unlock/easy_unlock_reauth.h"
31 #include "chrome/browser/chromeos/login/session/user_session_manager.h" 29 #include "chrome/browser/chromeos/login/session/user_session_manager.h"
32 #include "chrome/browser/chromeos/profiles/profile_helper.h" 30 #include "chrome/browser/chromeos/profiles/profile_helper.h"
33 #include "components/user_manager/user_manager.h" 31 #include "components/user_manager/user_manager.h"
34 #endif 32 #endif
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 CheckCryptohomeKeysAndMaybeHardlock(); 106 CheckCryptohomeKeysAndMaybeHardlock();
109 } 107 }
110 #endif 108 #endif
111 109
112 void EasyUnlockServiceRegular::OpenSetupApp() { 110 void EasyUnlockServiceRegular::OpenSetupApp() {
113 ExtensionService* service = 111 ExtensionService* service =
114 extensions::ExtensionSystem::Get(profile())->extension_service(); 112 extensions::ExtensionSystem::Get(profile())->extension_service();
115 const extensions::Extension* extension = 113 const extensions::Extension* extension =
116 service->GetExtensionById(extension_misc::kEasyUnlockAppId, false); 114 service->GetExtensionById(extension_misc::kEasyUnlockAppId, false);
117 115
118 OpenApplication( 116 OpenApplication(AppLaunchParams(
119 AppLaunchParams(profile(), extension, extensions::LAUNCH_CONTAINER_WINDOW, 117 profile(), extension, extensions::LAUNCH_CONTAINER_WINDOW, NEW_WINDOW));
120 NEW_WINDOW, extensions::SOURCE_CHROME_INTERNAL));
121 } 118 }
122 119
123 const base::DictionaryValue* EasyUnlockServiceRegular::GetPermitAccess() const { 120 const base::DictionaryValue* EasyUnlockServiceRegular::GetPermitAccess() const {
124 const base::DictionaryValue* pairing_dict = 121 const base::DictionaryValue* pairing_dict =
125 profile()->GetPrefs()->GetDictionary(prefs::kEasyUnlockPairing); 122 profile()->GetPrefs()->GetDictionary(prefs::kEasyUnlockPairing);
126 const base::DictionaryValue* permit_dict = NULL; 123 const base::DictionaryValue* permit_dict = NULL;
127 if (pairing_dict && 124 if (pairing_dict &&
128 pairing_dict->GetDictionary(kKeyPermitAccess, &permit_dict)) 125 pairing_dict->GetDictionary(kKeyPermitAccess, &permit_dict))
129 return permit_dict; 126 return permit_dict;
130 127
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 306
310 if (!success) { 307 if (!success) {
311 SetTurnOffFlowStatus(FAIL); 308 SetTurnOffFlowStatus(FAIL);
312 return; 309 return;
313 } 310 }
314 311
315 ClearRemoteDevices(); 312 ClearRemoteDevices();
316 SetTurnOffFlowStatus(IDLE); 313 SetTurnOffFlowStatus(IDLE);
317 ReloadApp(); 314 ReloadApp();
318 } 315 }
OLDNEW
« no previous file with comments | « chrome/browser/search/hotword_service.cc ('k') | chrome/browser/ui/app_list/app_list_controller_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698