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

Side by Side Diff: components/signin/core/browser/about_signin_internals.cc

Issue 1094103005: Profile chooser on mac was passing wrong value to signin error controller. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 5 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "components/signin/core/browser/about_signin_internals.h" 5 #include "components/signin/core/browser/about_signin_internals.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/hash.h" 8 #include "base/hash.h"
9 #include "base/i18n/time_formatting.h" 9 #include "base/i18n/time_formatting.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 account_id); 498 account_id);
499 AddSectionEntry(basic_info, 499 AddSectionEntry(basic_info,
500 SigninStatusFieldToLabel( 500 SigninStatusFieldToLabel(
501 static_cast<UntimedSigninStatusField>(GAIA_ID)), 501 static_cast<UntimedSigninStatusField>(GAIA_ID)),
502 account_tracker->GetAccountInfo(account_id).gaia); 502 account_tracker->GetAccountInfo(account_id).gaia);
503 AddSectionEntry(basic_info, 503 AddSectionEntry(basic_info,
504 SigninStatusFieldToLabel( 504 SigninStatusFieldToLabel(
505 static_cast<UntimedSigninStatusField>(USERNAME)), 505 static_cast<UntimedSigninStatusField>(USERNAME)),
506 signin_manager->GetAuthenticatedUsername()); 506 signin_manager->GetAuthenticatedUsername());
507 if (signin_error_controller->HasError()) { 507 if (signin_error_controller->HasError()) {
508 const std::string error_account_id =
509 signin_error_controller->error_account_id();
510 const std::string error_username =
511 account_tracker->GetAccountInfo(error_account_id).email;
508 AddSectionEntry(basic_info, "Auth Error", 512 AddSectionEntry(basic_info, "Auth Error",
509 signin_error_controller->auth_error().ToString()); 513 signin_error_controller->auth_error().ToString());
510 AddSectionEntry(basic_info, "Auth Error Username", 514 AddSectionEntry(basic_info, "Auth Error Account Id", error_account_id);
511 signin_error_controller->error_username()); 515 AddSectionEntry(basic_info, "Auth Error Username", error_username);
512 } else { 516 } else {
513 AddSectionEntry(basic_info, "Auth Error", "None"); 517 AddSectionEntry(basic_info, "Auth Error", "None");
514 } 518 }
515 } 519 }
516 520
517 #if !defined(OS_CHROMEOS) 521 #if !defined(OS_CHROMEOS)
518 // TODO(robliao): Remove ScopedTracker below once https://crbug.com/422460 is 522 // TODO(robliao): Remove ScopedTracker below once https://crbug.com/422460 is
519 // fixed. 523 // fixed.
520 tracked_objects::ScopedTracker tracking_profile3( 524 tracked_objects::ScopedTracker tracking_profile3(
521 FROM_HERE_WITH_EXPLICIT_FUNCTION( 525 FROM_HERE_WITH_EXPLICIT_FUNCTION(
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 } 592 }
589 593
590 for(const std::string& account_id : accounts_in_token_service) { 594 for(const std::string& account_id : accounts_in_token_service) {
591 base::DictionaryValue* entry = new base::DictionaryValue(); 595 base::DictionaryValue* entry = new base::DictionaryValue();
592 entry->SetString("accountId", account_id); 596 entry->SetString("accountId", account_id);
593 account_info->Append(entry); 597 account_info->Append(entry);
594 } 598 }
595 599
596 return signin_status.Pass(); 600 return signin_status.Pass();
597 } 601 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698