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

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: 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 extension_service->GetExtensionById(app_id_, false); 82 extension_service->GetExtensionById(app_id_, false);
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() {
sacomoto 2015/09/29 18:45:57 Please add a TODO here.
Tim Song 2015/09/30 00:05:04 Done.
93 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
94 proximity_auth::switches::kEnableBluetoothLowEnergyDiscovery))
95 return;
96
93 ExtensionService* extension_service = extension_system_->extension_service(); 97 ExtensionService* extension_service = extension_system_->extension_service();
94 if (!extension_service) 98 if (!extension_service)
95 return; 99 return;
96 100
97 #if defined(OS_CHROMEOS) 101 #if defined(OS_CHROMEOS)
98 // TODO(xiyuan): Remove this when the app is bundled with chrome. 102 // TODO(xiyuan): Remove this when the app is bundled with chrome.
99 if (!base::SysInfo::IsRunningOnChromeOS() && 103 if (!base::SysInfo::IsRunningOnChromeOS() &&
100 !base::CommandLine::ForCurrentProcess()->HasSwitch( 104 !base::CommandLine::ForCurrentProcess()->HasSwitch(
101 proximity_auth::switches::kForceLoadEasyUnlockAppInTests)) { 105 proximity_auth::switches::kForceLoadEasyUnlockAppInTests)) {
102 return; 106 return;
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 194 }
191 195
192 // static 196 // static
193 scoped_ptr<EasyUnlockAppManager> EasyUnlockAppManager::Create( 197 scoped_ptr<EasyUnlockAppManager> EasyUnlockAppManager::Create(
194 extensions::ExtensionSystem* extension_system, 198 extensions::ExtensionSystem* extension_system,
195 int manifest_id, 199 int manifest_id,
196 const base::FilePath& app_path) { 200 const base::FilePath& app_path) {
197 return scoped_ptr<EasyUnlockAppManager>( 201 return scoped_ptr<EasyUnlockAppManager>(
198 new EasyUnlockAppManagerImpl(extension_system, manifest_id, app_path)); 202 new EasyUnlockAppManagerImpl(extension_system, manifest_id, app_path));
199 } 203 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698