OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/signin_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/signin_screen_handler.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/stringprintf.h" | 8 #include "base/stringprintf.h" |
9 #include "base/task.h" | 9 #include "base/task.h" |
10 #include "base/values.h" | 10 #include "base/values.h" |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 dns_cleared_ = true; | 266 dns_cleared_ = true; |
267 ShowSigninScreenIfReady(); | 267 ShowSigninScreenIfReady(); |
268 } | 268 } |
269 | 269 |
270 // Show sign in screen as soon as we clear dns cache the cookie jar. | 270 // Show sign in screen as soon as we clear dns cache the cookie jar. |
271 void SigninScreenHandler::ShowSigninScreenIfReady() { | 271 void SigninScreenHandler::ShowSigninScreenIfReady() { |
272 if (!dns_cleared_ || !cookies_cleared_) | 272 if (!dns_cleared_ || !cookies_cleared_) |
273 return; | 273 return; |
274 | 274 |
275 DictionaryValue params; | 275 DictionaryValue params; |
| 276 params.SetString("startUrl", kGaiaExtStartPage); |
276 params.SetString("email", email_); | 277 params.SetString("email", email_); |
277 | 278 |
278 std::string url = kGaiaExtStartPage; | |
279 const std::string app_locale = g_browser_process->GetApplicationLocale(); | 279 const std::string app_locale = g_browser_process->GetApplicationLocale(); |
280 if (!app_locale.empty()) { | 280 if (!app_locale.empty()) |
281 url.append("?hl="); | 281 params.SetString("hl", app_locale); |
282 url.append(app_locale); | |
283 } | |
284 params.SetString("startUrl", url); | |
285 | 282 |
286 params.SetBoolean("createAccount", | 283 params.SetBoolean("createAccount", |
287 UserCrosSettingsProvider::cached_allow_new_user()); | 284 UserCrosSettingsProvider::cached_allow_new_user()); |
288 params.SetBoolean("guestSignin", | 285 params.SetBoolean("guestSignin", |
289 UserCrosSettingsProvider::cached_allow_guest()); | 286 UserCrosSettingsProvider::cached_allow_guest()); |
290 email_.clear(); | 287 email_.clear(); |
291 ShowScreen(kGaiaSigninScreen, ¶ms); | 288 ShowScreen(kGaiaSigninScreen, ¶ms); |
292 } | 289 } |
293 | 290 |
294 void SigninScreenHandler::HandleCompleteLogin(const base::ListValue* args) { | 291 void SigninScreenHandler::HandleCompleteLogin(const base::ListValue* args) { |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 BrowsingDataRemover* remover = new BrowsingDataRemover( | 455 BrowsingDataRemover* remover = new BrowsingDataRemover( |
459 Profile::FromBrowserContext(web_ui_->tab_contents()->browser_context()), | 456 Profile::FromBrowserContext(web_ui_->tab_contents()->browser_context()), |
460 BrowsingDataRemover::EVERYTHING, | 457 BrowsingDataRemover::EVERYTHING, |
461 base::Time()); | 458 base::Time()); |
462 remover->AddObserver(this); | 459 remover->AddObserver(this); |
463 remover->Remove(BrowsingDataRemover::REMOVE_COOKIES | | 460 remover->Remove(BrowsingDataRemover::REMOVE_COOKIES | |
464 BrowsingDataRemover::REMOVE_LSO_DATA); | 461 BrowsingDataRemover::REMOVE_LSO_DATA); |
465 } | 462 } |
466 | 463 |
467 } // namespace chromeos | 464 } // namespace chromeos |
OLD | NEW |