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

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

Issue 7809015: Added user email/password switches for test automation. (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/gaia_auth/manifest_test.json ('k') | chrome/common/chrome_switches.h » ('j') | 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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 278
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 params.SetString("hl", app_locale); 281 params.SetString("hl", app_locale);
282 282
283 params.SetBoolean("createAccount", 283 params.SetBoolean("createAccount",
284 UserCrosSettingsProvider::cached_allow_new_user()); 284 UserCrosSettingsProvider::cached_allow_new_user());
285 params.SetBoolean("guestSignin", 285 params.SetBoolean("guestSignin",
286 UserCrosSettingsProvider::cached_allow_guest()); 286 UserCrosSettingsProvider::cached_allow_guest());
287 email_.clear(); 287 email_.clear();
288 // Test automation data:
289 const CommandLine* command_line = CommandLine::ForCurrentProcess();
290 if (command_line->HasSwitch(switches::kAuthExtensionPath)) {
291 if (command_line->HasSwitch(switches::kTestAuthEmail)) {
292 params.SetString("test_email",
293 command_line->GetSwitchValueASCII(
294 switches::kTestAuthEmail));
295 }
296 if (command_line->HasSwitch(switches::kTestAuthPassword)) {
297 params.SetString("test_password",
298 command_line->GetSwitchValueASCII(
299 switches::kTestAuthPassword));
300 }
301 }
288 ShowScreen(kGaiaSigninScreen, &params); 302 ShowScreen(kGaiaSigninScreen, &params);
289 } 303 }
290 304
291 void SigninScreenHandler::HandleCompleteLogin(const base::ListValue* args) { 305 void SigninScreenHandler::HandleCompleteLogin(const base::ListValue* args) {
292 std::string username; 306 std::string username;
293 std::string password; 307 std::string password;
294 if (!args->GetString(0, &username) || 308 if (!args->GetString(0, &username) ||
295 !args->GetString(1, &password)) { 309 !args->GetString(1, &password)) {
296 NOTREACHED(); 310 NOTREACHED();
297 return; 311 return;
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 BrowsingDataRemover* remover = new BrowsingDataRemover( 469 BrowsingDataRemover* remover = new BrowsingDataRemover(
456 Profile::FromBrowserContext(web_ui_->tab_contents()->browser_context()), 470 Profile::FromBrowserContext(web_ui_->tab_contents()->browser_context()),
457 BrowsingDataRemover::EVERYTHING, 471 BrowsingDataRemover::EVERYTHING,
458 base::Time()); 472 base::Time());
459 remover->AddObserver(this); 473 remover->AddObserver(this);
460 remover->Remove(BrowsingDataRemover::REMOVE_COOKIES | 474 remover->Remove(BrowsingDataRemover::REMOVE_COOKIES |
461 BrowsingDataRemover::REMOVE_LSO_DATA); 475 BrowsingDataRemover::REMOVE_LSO_DATA);
462 } 476 }
463 477
464 } // namespace chromeos 478 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/resources/gaia_auth/manifest_test.json ('k') | chrome/common/chrome_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698