| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/views/profile_chooser_view.h" | 5 #include "chrome/browser/ui/views/profile_chooser_view.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/profiles/profile_info_util.h" | 10 #include "chrome/browser/profiles/profile_info_util.h" |
| (...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 Profile* profile = browser_->profile(); | 617 Profile* profile = browser_->profile(); |
| 618 std::vector<std::string> accounts( | 618 std::vector<std::string> accounts( |
| 619 ProfileOAuth2TokenServiceFactory::GetForProfile(profile)->GetAccounts()); | 619 ProfileOAuth2TokenServiceFactory::GetForProfile(profile)->GetAccounts()); |
| 620 for (size_t i = 0; i < accounts.size(); ++i) { | 620 for (size_t i = 0; i < accounts.size(); ++i) { |
| 621 if (i != 0) | 621 if (i != 0) |
| 622 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); | 622 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); |
| 623 | 623 |
| 624 views::Label* email_label = new views::Label(UTF8ToUTF16(accounts[i])); | 624 views::Label* email_label = new views::Label(UTF8ToUTF16(accounts[i])); |
| 625 email_label->SetElideBehavior(views::Label::ELIDE_AS_EMAIL); | 625 email_label->SetElideBehavior(views::Label::ELIDE_AS_EMAIL); |
| 626 email_label->SetFont(ui::ResourceBundle::GetSharedInstance().GetFont( | 626 email_label->SetFont(ui::ResourceBundle::GetSharedInstance().GetFont( |
| 627 ui::ResourceBundle::SmallFont)); | 627 ui::ResourceBundle::BaseFont)); |
| 628 email_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 628 email_label->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| 629 | 629 |
| 630 layout->StartRow(1, 0); | 630 layout->StartRow(1, 0); |
| 631 layout->AddView(email_label); | 631 layout->AddView(email_label); |
| 632 } | 632 } |
| 633 | 633 |
| 634 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); | 634 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); |
| 635 | 635 |
| 636 add_account_button_ = new views::BlueButton( | 636 add_account_button_ = new views::BlueButton( |
| 637 this, | 637 this, |
| 638 l10n_util::GetStringFUTF16(IDS_PROFILES_PROFILE_ADD_ACCOUNT_BUTTON, | 638 l10n_util::GetStringFUTF16(IDS_PROFILES_PROFILE_ADD_ACCOUNT_BUTTON, |
| 639 avatar_item.name)); | 639 avatar_item.name)); |
| 640 layout->StartRow(1, 0); | 640 layout->StartRow(1, 0); |
| 641 layout->AddView(add_account_button_); | 641 layout->AddView(add_account_button_); |
| 642 return view; | 642 return view; |
| 643 } | 643 } |
| OLD | NEW |