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

Side by Side Diff: chrome/browser/chrome_browser_main.cc

Issue 8773046: [cros] Display emails of users are stored in a separate dictionary in Local State. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes. Created 9 years 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
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/chrome_browser_main.h" 5 #include "chrome/browser/chrome_browser_main.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 477
478 void OnLoginSuccess(const std::string& username, 478 void OnLoginSuccess(const std::string& username,
479 const std::string& password, 479 const std::string& password,
480 const GaiaAuthConsumer::ClientLoginResult& credentials, 480 const GaiaAuthConsumer::ClientLoginResult& credentials,
481 bool pending_requests, 481 bool pending_requests,
482 bool using_oauth) { 482 bool using_oauth) {
483 pending_requests_ = pending_requests; 483 pending_requests_ = pending_requests;
484 if (!profile_prepared_) { 484 if (!profile_prepared_) {
485 // Will call OnProfilePrepared in the end. 485 // Will call OnProfilePrepared in the end.
486 chromeos::LoginUtils::Get()->PrepareProfile(username, 486 chromeos::LoginUtils::Get()->PrepareProfile(username,
487 std::string(),
487 password, 488 password,
488 credentials, 489 credentials,
489 pending_requests, 490 pending_requests,
490 using_oauth, 491 using_oauth,
491 false, 492 false,
492 this); 493 this);
493 } else if (!pending_requests) { 494 } else if (!pending_requests) {
494 delete this; 495 delete this;
495 } 496 }
496 } 497 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 } 532 }
532 browser::ShowLoginWizard(first_screen, size); 533 browser::ShowLoginWizard(first_screen, size);
533 } else if (parsed_command_line.HasSwitch(switches::kLoginUser) && 534 } else if (parsed_command_line.HasSwitch(switches::kLoginUser) &&
534 parsed_command_line.HasSwitch(switches::kLoginPassword)) { 535 parsed_command_line.HasSwitch(switches::kLoginPassword)) {
535 chromeos::BootTimesLoader::Get()->RecordLoginAttempted(); 536 chromeos::BootTimesLoader::Get()->RecordLoginAttempted();
536 new StubLogin( 537 new StubLogin(
537 parsed_command_line.GetSwitchValueASCII(switches::kLoginUser), 538 parsed_command_line.GetSwitchValueASCII(switches::kLoginUser),
538 parsed_command_line.GetSwitchValueASCII(switches::kLoginPassword)); 539 parsed_command_line.GetSwitchValueASCII(switches::kLoginPassword));
539 } else { 540 } else {
540 if (!parsed_command_line.HasSwitch(switches::kTestName)) { 541 if (!parsed_command_line.HasSwitch(switches::kTestName)) {
541 // We did not log in (we crashed or are debugging), so we need to 542 // We did not log in (we crashed or are debugging), so we need to
Nikita (slow) 2011/12/05 13:13:04 nit: Please update comment since we're not passing
Ivan Korotkov 2011/12/05 14:12:48 Done.
542 // set the user name for sync. 543 // set the user name for sync.
543 chromeos::LoginUtils::Get()->RestoreAuthenticationSession( 544 chromeos::LoginUtils::Get()->RestoreAuthenticationSession(profile);
544 chromeos::UserManager::Get()->logged_in_user().email(), profile);
545 } 545 }
546 } 546 }
547 } 547 }
548 548
549 #endif // defined(OS_CHROMEOS) 549 #endif // defined(OS_CHROMEOS)
550 550
551 #if defined(OS_MACOSX) 551 #if defined(OS_MACOSX)
552 OSStatus KeychainCallback(SecKeychainEvent keychain_event, 552 OSStatus KeychainCallback(SecKeychainEvent keychain_event,
553 SecKeychainCallbackInfo *info, void *context) { 553 SecKeychainCallbackInfo *info, void *context) {
554 return noErr; 554 return noErr;
(...skipping 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after
2136 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) && 2136 if (env->GetVar(chrome::kPreReadEnvironmentVariable, &pre_read) &&
2137 (pre_read == "0" || pre_read == "1")) { 2137 (pre_read == "0" || pre_read == "1")) {
2138 std::string uma_name(name); 2138 std::string uma_name(name);
2139 uma_name += "_PreRead"; 2139 uma_name += "_PreRead";
2140 uma_name += pre_read == "1" ? "Enabled" : "Disabled"; 2140 uma_name += pre_read == "1" ? "Enabled" : "Disabled";
2141 AddPreReadHistogramTime(uma_name.c_str(), time); 2141 AddPreReadHistogramTime(uma_name.c_str(), time);
2142 } 2142 }
2143 #endif 2143 #endif
2144 #endif 2144 #endif
2145 } 2145 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698