| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/profiles/profile_chooser_view.h" | 5 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/metrics/user_metrics.h" | 8 #include "base/metrics/user_metrics.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/app/vector_icons/vector_icons.h" | 10 #include "chrome/app/vector_icons/vector_icons.h" |
| (...skipping 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1523 users_button_ = new BackgroundColorHoverButton( | 1523 users_button_ = new BackgroundColorHoverButton( |
| 1524 this, text, | 1524 this, text, |
| 1525 gfx::CreateVectorIcon(settings_icon, kIconSize, gfx::kChromeIconGrey)); | 1525 gfx::CreateVectorIcon(settings_icon, kIconSize, gfx::kChromeIconGrey)); |
| 1526 | 1526 |
| 1527 layout->StartRow(1, 0); | 1527 layout->StartRow(1, 0); |
| 1528 layout->AddView(users_button_); | 1528 layout->AddView(users_button_); |
| 1529 | 1529 |
| 1530 if (display_lock) { | 1530 if (display_lock) { |
| 1531 lock_button_ = new BackgroundColorHoverButton( | 1531 lock_button_ = new BackgroundColorHoverButton( |
| 1532 this, l10n_util::GetStringUTF16(IDS_PROFILES_PROFILE_SIGNOUT_BUTTON), | 1532 this, l10n_util::GetStringUTF16(IDS_PROFILES_PROFILE_SIGNOUT_BUTTON), |
| 1533 gfx::CreateVectorIcon(kLockIcon, kIconSize, gfx::kChromeIconGrey)); | 1533 gfx::CreateVectorIcon(ui::kLockIcon, kIconSize, gfx::kChromeIconGrey)); |
| 1534 layout->StartRow(1, 0); | 1534 layout->StartRow(1, 0); |
| 1535 layout->AddView(lock_button_); | 1535 layout->AddView(lock_button_); |
| 1536 } else if (!is_guest) { | 1536 } else if (!is_guest) { |
| 1537 int num_browsers = 0; | 1537 int num_browsers = 0; |
| 1538 for (auto* browser : *BrowserList::GetInstance()) { | 1538 for (auto* browser : *BrowserList::GetInstance()) { |
| 1539 if (browser->profile()->GetOriginalProfile() == | 1539 if (browser->profile()->GetOriginalProfile() == |
| 1540 browser_->profile()->GetOriginalProfile()) | 1540 browser_->profile()->GetOriginalProfile()) |
| 1541 num_browsers++; | 1541 num_browsers++; |
| 1542 } | 1542 } |
| 1543 if (num_browsers > 1) { | 1543 if (num_browsers > 1) { |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1855 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != | 1855 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != |
| 1856 IncognitoModePrefs::DISABLED; | 1856 IncognitoModePrefs::DISABLED; |
| 1857 return incognito_available && !browser_->profile()->IsGuestSession(); | 1857 return incognito_available && !browser_->profile()->IsGuestSession(); |
| 1858 } | 1858 } |
| 1859 | 1859 |
| 1860 void ProfileChooserView::PostActionPerformed( | 1860 void ProfileChooserView::PostActionPerformed( |
| 1861 ProfileMetrics::ProfileDesktopMenu action_performed) { | 1861 ProfileMetrics::ProfileDesktopMenu action_performed) { |
| 1862 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); | 1862 ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); |
| 1863 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; | 1863 gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; |
| 1864 } | 1864 } |
| OLD | NEW |