| 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/login/app_launch_controller.h" | 5 #include "chrome/browser/chromeos/login/app_launch_controller.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/json/json_file_value_serializer.h" | 10 #include "base/json/json_file_value_serializer.h" |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 return can_configure_network_callback_->Run(); | 354 return can_configure_network_callback_->Run(); |
| 355 | 355 |
| 356 if (IsEnterpriseManaged()) { | 356 if (IsEnterpriseManaged()) { |
| 357 bool should_prompt; | 357 bool should_prompt; |
| 358 if (CrosSettings::Get()->GetBoolean( | 358 if (CrosSettings::Get()->GetBoolean( |
| 359 kAccountsPrefDeviceLocalAccountPromptForNetworkWhenOffline, | 359 kAccountsPrefDeviceLocalAccountPromptForNetworkWhenOffline, |
| 360 &should_prompt)) { | 360 &should_prompt)) { |
| 361 return should_prompt; | 361 return should_prompt; |
| 362 } | 362 } |
| 363 | 363 |
| 364 // Default to true to allow network configuration if the policy is missing. | 364 // Network configuration has to be explicitly allowed by the policy. |
| 365 return true; | 365 // Default to false if the policy is missing. |
| 366 return false; |
| 366 } | 367 } |
| 367 | 368 |
| 368 return user_manager::UserManager::Get()->GetOwnerAccountId().is_valid(); | 369 return user_manager::UserManager::Get()->GetOwnerAccountId().is_valid(); |
| 369 } | 370 } |
| 370 | 371 |
| 371 bool AppLaunchController::NeedOwnerAuthToConfigureNetwork() { | 372 bool AppLaunchController::NeedOwnerAuthToConfigureNetwork() { |
| 372 if (need_owner_auth_to_configure_network_callback_) | 373 if (need_owner_auth_to_configure_network_callback_) |
| 373 return need_owner_auth_to_configure_network_callback_->Run(); | 374 return need_owner_auth_to_configure_network_callback_->Run(); |
| 374 | 375 |
| 375 return !IsEnterpriseManaged(); | 376 return !IsEnterpriseManaged(); |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 KioskAppLaunchError::Save(error); | 513 KioskAppLaunchError::Save(error); |
| 513 chrome::AttemptUserExit(); | 514 chrome::AttemptUserExit(); |
| 514 CleanUp(); | 515 CleanUp(); |
| 515 } | 516 } |
| 516 | 517 |
| 517 bool AppLaunchController::IsShowingNetworkConfigScreen() { | 518 bool AppLaunchController::IsShowingNetworkConfigScreen() { |
| 518 return network_config_requested_; | 519 return network_config_requested_; |
| 519 } | 520 } |
| 520 | 521 |
| 521 } // namespace chromeos | 522 } // namespace chromeos |
| OLD | NEW |