Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/chromeos/app_mode/kiosk_app_manager.h" | 5 #include "chrome/browser/chromeos/app_mode/kiosk_app_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 285 // Locks device for enterprise. | 285 // Locks device for enterprise. |
| 286 InstallAttributes::LockResult LockDeviceForEnterprise() { | 286 InstallAttributes::LockResult LockDeviceForEnterprise() { |
| 287 std::unique_ptr<InstallAttributes::LockResult> lock_result = | 287 std::unique_ptr<InstallAttributes::LockResult> lock_result = |
| 288 base::MakeUnique<InstallAttributes::LockResult>( | 288 base::MakeUnique<InstallAttributes::LockResult>( |
| 289 InstallAttributes::LOCK_NOT_READY); | 289 InstallAttributes::LOCK_NOT_READY); |
| 290 scoped_refptr<content::MessageLoopRunner> runner = | 290 scoped_refptr<content::MessageLoopRunner> runner = |
| 291 new content::MessageLoopRunner; | 291 new content::MessageLoopRunner; |
| 292 policy::BrowserPolicyConnectorChromeOS* connector = | 292 policy::BrowserPolicyConnectorChromeOS* connector = |
| 293 g_browser_process->platform_part()->browser_policy_connector_chromeos(); | 293 g_browser_process->platform_part()->browser_policy_connector_chromeos(); |
| 294 connector->GetInstallAttributes()->LockDevice( | 294 connector->GetInstallAttributes()->LockDevice( |
| 295 policy::DEVICE_MODE_ENTERPRISE, | |
| 295 "user@domain.com", | 296 "user@domain.com", |
|
emaxx
2016/10/11 17:26:37
I guess, "user@" should be removed here too, as th
Thiemo Nagel
2016/10/11 18:23:30
Good catch, thanks. Fixed.
| |
| 296 policy::DEVICE_MODE_ENTERPRISE, | 297 std::string(), // realm |
|
emaxx
2016/10/11 17:26:37
Did you consider defining a special constant for t
Thiemo Nagel
2016/10/11 18:23:30
Interesting point. Actually I think it's probably
| |
| 297 "device-id", | 298 "device-id", |
| 298 base::Bind( | 299 base::Bind( |
| 299 &OnEnterpriseDeviceLock, lock_result.get(), runner->QuitClosure())); | 300 &OnEnterpriseDeviceLock, lock_result.get(), runner->QuitClosure())); |
| 300 runner->Run(); | 301 runner->Run(); |
| 301 return *lock_result.get(); | 302 return *lock_result.get(); |
| 302 } | 303 } |
| 303 | 304 |
| 304 void SetExistingApp(const std::string& app_id, | 305 void SetExistingApp(const std::string& app_id, |
| 305 const std::string& app_name, | 306 const std::string& app_name, |
| 306 const std::string& icon_file_name, | 307 const std::string& icon_file_name, |
| (...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 937 MakeKioskApp("App Name", "1.0", kNoneAutoLaucnhedAppId, | 938 MakeKioskApp("App Name", "1.0", kNoneAutoLaucnhedAppId, |
| 938 kTestCases[i].required_platform_version); | 939 kTestCases[i].required_platform_version); |
| 939 EXPECT_TRUE(manager()->IsPlatformCompliantWithApp(app.get())) | 940 EXPECT_TRUE(manager()->IsPlatformCompliantWithApp(app.get())) |
| 940 << "Test case for non auto launch app: " << i | 941 << "Test case for non auto launch app: " << i |
| 941 << ", required_platform_version=" | 942 << ", required_platform_version=" |
| 942 << kTestCases[i].required_platform_version; | 943 << kTestCases[i].required_platform_version; |
| 943 } | 944 } |
| 944 } | 945 } |
| 945 | 946 |
| 946 } // namespace chromeos | 947 } // namespace chromeos |
| OLD | NEW |