Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: chrome/browser/ui/webui/chromeos/login/signin_screen_handler.cc

Issue 7793007: [ChromeOS] Pass optional email to auth extension. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/resources/chromeos/login/screen_gaia_signin.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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, &params); 288 ShowScreen(kGaiaSigninScreen, &params);
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
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
OLDNEW
« no previous file with comments | « chrome/browser/resources/chromeos/login/screen_gaia_signin.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698