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/ui/webui/chromeos/login/gaia_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/gaia_screen_handler.h" |
6 | 6 |
7 #include "ash/system/devicetype_utils.h" | 7 #include "ash/system/devicetype_utils.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "base/guid.h" | 10 #include "base/guid.h" |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
262 LoadAuthExtension(true /* force */, false /* offline */); | 262 LoadAuthExtension(true /* force */, false /* offline */); |
263 } | 263 } |
264 } | 264 } |
265 | 265 |
266 void GaiaScreenHandler::DisableRestrictiveProxyCheckForTest() { | 266 void GaiaScreenHandler::DisableRestrictiveProxyCheckForTest() { |
267 disable_restrictive_proxy_check_for_test_ = true; | 267 disable_restrictive_proxy_check_for_test_ = true; |
268 } | 268 } |
269 | 269 |
270 void GaiaScreenHandler::LoadGaia(const GaiaContext& context) { | 270 void GaiaScreenHandler::LoadGaia(const GaiaContext& context) { |
271 base::PostTaskWithTraitsAndReplyWithResult( | 271 base::PostTaskWithTraitsAndReplyWithResult( |
272 FROM_HERE, base::TaskTraits().MayBlock().WithPriority( | 272 FROM_HERE, {base::MayBlock(), base::TaskPriority::BACKGROUND}, |
273 base::TaskPriority::BACKGROUND), | |
274 base::Bind(&version_loader::GetVersion, version_loader::VERSION_SHORT), | 273 base::Bind(&version_loader::GetVersion, version_loader::VERSION_SHORT), |
275 base::Bind(&GaiaScreenHandler::LoadGaiaWithVersion, | 274 base::Bind(&GaiaScreenHandler::LoadGaiaWithVersion, |
276 weak_factory_.GetWeakPtr(), context)); | 275 weak_factory_.GetWeakPtr(), context)); |
277 } | 276 } |
278 | 277 |
279 void GaiaScreenHandler::LoadGaiaWithVersion( | 278 void GaiaScreenHandler::LoadGaiaWithVersion( |
280 const GaiaContext& context, | 279 const GaiaContext& context, |
281 const std::string& platform_version) { | 280 const std::string& platform_version) { |
282 base::DictionaryValue params; | 281 base::DictionaryValue params; |
283 | 282 |
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
975 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() { | 974 SigninScreenHandlerDelegate* GaiaScreenHandler::Delegate() { |
976 return signin_screen_handler_->delegate_; | 975 return signin_screen_handler_->delegate_; |
977 } | 976 } |
978 | 977 |
979 bool GaiaScreenHandler::IsRestrictiveProxy() const { | 978 bool GaiaScreenHandler::IsRestrictiveProxy() const { |
980 return !disable_restrictive_proxy_check_for_test_ && | 979 return !disable_restrictive_proxy_check_for_test_ && |
981 !IsOnline(captive_portal_status_); | 980 !IsOnline(captive_portal_status_); |
982 } | 981 } |
983 | 982 |
984 } // namespace chromeos | 983 } // namespace chromeos |
OLD | NEW |