| OLD | NEW |
| 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 <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 | 72 |
| 73 EasyUnlockAppManagerImpl::~EasyUnlockAppManagerImpl() { | 73 EasyUnlockAppManagerImpl::~EasyUnlockAppManagerImpl() { |
| 74 } | 74 } |
| 75 | 75 |
| 76 void EasyUnlockAppManagerImpl::EnsureReady( | 76 void EasyUnlockAppManagerImpl::EnsureReady( |
| 77 const base::Closure& ready_callback) { | 77 const base::Closure& ready_callback) { |
| 78 extension_system_->ready().Post(FROM_HERE, ready_callback); | 78 extension_system_->ready().Post(FROM_HERE, ready_callback); |
| 79 } | 79 } |
| 80 | 80 |
| 81 void EasyUnlockAppManagerImpl::LaunchSetup() { | 81 void EasyUnlockAppManagerImpl::LaunchSetup() { |
| 82 PA_LOG(WARNING) << "LaunchSetup()"; | |
| 83 ExtensionService* extension_service = extension_system_->extension_service(); | 82 ExtensionService* extension_service = extension_system_->extension_service(); |
| 84 if (!extension_service) | 83 if (!extension_service) |
| 85 return; | 84 return; |
| 86 PA_LOG(WARNING) << "got extension service"; | |
| 87 | 85 |
| 88 const extensions::Extension* extension = | 86 const extensions::Extension* extension = |
| 89 extension_service->GetExtensionById(app_id_, false); | 87 extension_service->GetExtensionById(app_id_, false); |
| 90 if (!extension) { | 88 if (!extension) { |
| 91 PA_LOG(WARNING) << "No extension"; | 89 PA_LOG(WARNING) << "No extension"; |
| 92 return; | 90 return; |
| 93 } | 91 } |
| 94 | 92 |
| 95 PA_LOG(WARNING) << "launching app..."; | |
| 96 OpenApplication(AppLaunchParams(extension_service->profile(), extension, | 93 OpenApplication(AppLaunchParams(extension_service->profile(), extension, |
| 97 extensions::LAUNCH_CONTAINER_WINDOW, | 94 extensions::LAUNCH_CONTAINER_WINDOW, |
| 98 WindowOpenDisposition::NEW_WINDOW, | 95 WindowOpenDisposition::NEW_WINDOW, |
| 99 extensions::SOURCE_CHROME_INTERNAL)); | 96 extensions::SOURCE_CHROME_INTERNAL)); |
| 100 } | 97 } |
| 101 | 98 |
| 102 void EasyUnlockAppManagerImpl::LoadApp() { | 99 void EasyUnlockAppManagerImpl::LoadApp() { |
| 103 ExtensionService* extension_service = extension_system_->extension_service(); | 100 ExtensionService* extension_service = extension_system_->extension_service(); |
| 104 if (!extension_service) | 101 if (!extension_service) |
| 105 return; | 102 return; |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 } | 197 } |
| 201 | 198 |
| 202 // static | 199 // static |
| 203 std::unique_ptr<EasyUnlockAppManager> EasyUnlockAppManager::Create( | 200 std::unique_ptr<EasyUnlockAppManager> EasyUnlockAppManager::Create( |
| 204 extensions::ExtensionSystem* extension_system, | 201 extensions::ExtensionSystem* extension_system, |
| 205 int manifest_id, | 202 int manifest_id, |
| 206 const base::FilePath& app_path) { | 203 const base::FilePath& app_path) { |
| 207 return std::unique_ptr<EasyUnlockAppManager>( | 204 return std::unique_ptr<EasyUnlockAppManager>( |
| 208 new EasyUnlockAppManagerImpl(extension_system, manifest_id, app_path)); | 205 new EasyUnlockAppManagerImpl(extension_system, manifest_id, app_path)); |
| 209 } | 206 } |
| OLD | NEW |