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

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

Issue 1372283002: Hook up ProximityAuthSystem in EasyUnlockService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth_connection
Patch Set: fix compile Created 5 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_app_manager.h" 5 #include "chrome/browser/signin/easy_unlock_app_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "chrome/browser/extensions/api/screenlock_private/screenlock_private_ap i.h" 9 #include "chrome/browser/extensions/api/screenlock_private/screenlock_private_ap i.h"
10 #include "chrome/browser/extensions/component_loader.h" 10 #include "chrome/browser/extensions/component_loader.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 if (!extension) 83 if (!extension)
84 return; 84 return;
85 85
86 OpenApplication(AppLaunchParams(extension_service->profile(), extension, 86 OpenApplication(AppLaunchParams(extension_service->profile(), extension,
87 extensions::LAUNCH_CONTAINER_WINDOW, 87 extensions::LAUNCH_CONTAINER_WINDOW,
88 NEW_WINDOW, 88 NEW_WINDOW,
89 extensions::SOURCE_CHROME_INTERNAL)); 89 extensions::SOURCE_CHROME_INTERNAL));
90 } 90 }
91 91
92 void EasyUnlockAppManagerImpl::LoadApp() { 92 void EasyUnlockAppManagerImpl::LoadApp() {
93 // TODO(tengs): This is here temporarily to suppress the app background page
94 // until we completely replace it with ProximityAuthSystem.
95 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
96 proximity_auth::switches::kEnableBluetoothLowEnergyDiscovery))
97 return;
sacomoto 2015/09/30 16:46:40 The setup app doesn't load without loading the bac
sacomoto 2015/09/30 17:40:53 Ok, I found the issue. The background app register
Tim Song 2015/09/30 19:13:39 Okay, I removed this check.
Tim Song 2015/09/30 19:13:39 Acknowledged.
98
93 ExtensionService* extension_service = extension_system_->extension_service(); 99 ExtensionService* extension_service = extension_system_->extension_service();
94 if (!extension_service) 100 if (!extension_service)
95 return; 101 return;
96 102
97 #if defined(OS_CHROMEOS) 103 #if defined(OS_CHROMEOS)
98 // TODO(xiyuan): Remove this when the app is bundled with chrome. 104 // TODO(xiyuan): Remove this when the app is bundled with chrome.
99 if (!base::SysInfo::IsRunningOnChromeOS() && 105 if (!base::SysInfo::IsRunningOnChromeOS() &&
100 !base::CommandLine::ForCurrentProcess()->HasSwitch( 106 !base::CommandLine::ForCurrentProcess()->HasSwitch(
101 proximity_auth::switches::kForceLoadEasyUnlockAppInTests)) { 107 proximity_auth::switches::kForceLoadEasyUnlockAppInTests)) {
102 return; 108 return;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 196 }
191 197
192 // static 198 // static
193 scoped_ptr<EasyUnlockAppManager> EasyUnlockAppManager::Create( 199 scoped_ptr<EasyUnlockAppManager> EasyUnlockAppManager::Create(
194 extensions::ExtensionSystem* extension_system, 200 extensions::ExtensionSystem* extension_system,
195 int manifest_id, 201 int manifest_id,
196 const base::FilePath& app_path) { 202 const base::FilePath& app_path) {
197 return scoped_ptr<EasyUnlockAppManager>( 203 return scoped_ptr<EasyUnlockAppManager>(
198 new EasyUnlockAppManagerImpl(extension_system, manifest_id, app_path)); 204 new EasyUnlockAppManagerImpl(extension_system, manifest_id, app_path));
199 } 205 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698