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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 if (!extension_service) | 82 if (!extension_service) |
83 return; | 83 return; |
84 | 84 |
85 const extensions::Extension* extension = | 85 const extensions::Extension* extension = |
86 extension_service->GetExtensionById(app_id_, false); | 86 extension_service->GetExtensionById(app_id_, false); |
87 if (!extension) | 87 if (!extension) |
88 return; | 88 return; |
89 | 89 |
90 OpenApplication(AppLaunchParams(extension_service->profile(), extension, | 90 OpenApplication(AppLaunchParams(extension_service->profile(), extension, |
91 extensions::LAUNCH_CONTAINER_WINDOW, | 91 extensions::LAUNCH_CONTAINER_WINDOW, |
92 NEW_WINDOW, | 92 WindowOpenDisposition::NEW_WINDOW, |
93 extensions::SOURCE_CHROME_INTERNAL)); | 93 extensions::SOURCE_CHROME_INTERNAL)); |
94 } | 94 } |
95 | 95 |
96 void EasyUnlockAppManagerImpl::LoadApp() { | 96 void EasyUnlockAppManagerImpl::LoadApp() { |
97 ExtensionService* extension_service = extension_system_->extension_service(); | 97 ExtensionService* extension_service = extension_system_->extension_service(); |
98 if (!extension_service) | 98 if (!extension_service) |
99 return; | 99 return; |
100 | 100 |
101 #if defined(OS_CHROMEOS) | 101 #if defined(OS_CHROMEOS) |
102 // TODO(xiyuan): Remove this when the app is bundled with chrome. | 102 // TODO(xiyuan): Remove this when the app is bundled with chrome. |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 } | 194 } |
195 | 195 |
196 // static | 196 // static |
197 std::unique_ptr<EasyUnlockAppManager> EasyUnlockAppManager::Create( | 197 std::unique_ptr<EasyUnlockAppManager> EasyUnlockAppManager::Create( |
198 extensions::ExtensionSystem* extension_system, | 198 extensions::ExtensionSystem* extension_system, |
199 int manifest_id, | 199 int manifest_id, |
200 const base::FilePath& app_path) { | 200 const base::FilePath& app_path) { |
201 return std::unique_ptr<EasyUnlockAppManager>( | 201 return std::unique_ptr<EasyUnlockAppManager>( |
202 new EasyUnlockAppManagerImpl(extension_system, manifest_id, app_path)); | 202 new EasyUnlockAppManagerImpl(extension_system, manifest_id, app_path)); |
203 } | 203 } |
OLD | NEW |