| 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/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.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/lifetime/application_lifetime.h" | 10 #include "chrome/browser/lifetime/application_lifetime.h" |
| (...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 590 std::string primary_account = | 590 std::string primary_account = |
| 591 SigninManagerFactory::GetForProfile(browser_->profile())-> | 591 SigninManagerFactory::GetForProfile(browser_->profile())-> |
| 592 GetAuthenticatedUsername(); | 592 GetAuthenticatedUsername(); |
| 593 ShowView(primary_account.empty() ? BUBBLE_VIEW_MODE_PROFILE_CHOOSER : | 593 ShowView(primary_account.empty() ? BUBBLE_VIEW_MODE_PROFILE_CHOOSER : |
| 594 BUBBLE_VIEW_MODE_ACCOUNT_MANAGEMENT, | 594 BUBBLE_VIEW_MODE_ACCOUNT_MANAGEMENT, |
| 595 avatar_menu_.get()); | 595 avatar_menu_.get()); |
| 596 } else if (sender == question_mark_button_) { | 596 } else if (sender == question_mark_button_) { |
| 597 tutorial_mode_ = TUTORIAL_MODE_SEND_FEEDBACK; | 597 tutorial_mode_ = TUTORIAL_MODE_SEND_FEEDBACK; |
| 598 ShowView(BUBBLE_VIEW_MODE_PROFILE_CHOOSER, avatar_menu_.get()); | 598 ShowView(BUBBLE_VIEW_MODE_PROFILE_CHOOSER, avatar_menu_.get()); |
| 599 } else if (sender == tutorial_send_feedback_button_) { | 599 } else if (sender == tutorial_send_feedback_button_) { |
| 600 ProfileMetrics::LogProfileUpgradeEnrollment( |
| 601 ProfileMetrics::PROFILE_ENROLLMENT_SEND_FEEDBACK); |
| 600 chrome::OpenFeedbackDialog(browser_); | 602 chrome::OpenFeedbackDialog(browser_); |
| 601 } else if (sender == end_preview_and_relaunch_button_) { | 603 } else if (sender == end_preview_and_relaunch_button_) { |
| 602 profiles::DisableNewProfileManagementPreview(); | 604 profiles::DisableNewProfileManagementPreview(); |
| 603 } else if (sender == end_preview_cancel_button_) { | 605 } else if (sender == end_preview_cancel_button_) { |
| 604 tutorial_mode_ = TUTORIAL_MODE_SEND_FEEDBACK; | 606 tutorial_mode_ = TUTORIAL_MODE_SEND_FEEDBACK; |
| 605 ShowView(BUBBLE_VIEW_MODE_PROFILE_CHOOSER, avatar_menu_.get()); | 607 ShowView(BUBBLE_VIEW_MODE_PROFILE_CHOOSER, avatar_menu_.get()); |
| 606 } else if (current_profile_photo_ && | 608 } else if (current_profile_photo_ && |
| 607 sender == current_profile_photo_->change_photo_button()) { | 609 sender == current_profile_photo_->change_photo_button()) { |
| 608 avatar_menu_->EditProfile(avatar_menu_->GetActiveProfileIndex()); | 610 avatar_menu_->EditProfile(avatar_menu_->GetActiveProfileIndex()); |
| 609 } else if (sender == signin_current_profile_link_) { | 611 } else if (sender == signin_current_profile_link_) { |
| (...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1297 layout->StartRowWithPadding( | 1299 layout->StartRowWithPadding( |
| 1298 1, 0, 0, views::kUnrelatedControlVerticalSpacing); | 1300 1, 0, 0, views::kUnrelatedControlVerticalSpacing); |
| 1299 layout->AddView(end_preview_and_relaunch_button_); | 1301 layout->AddView(end_preview_and_relaunch_button_); |
| 1300 | 1302 |
| 1301 TitleCard* title_card = new TitleCard( | 1303 TitleCard* title_card = new TitleCard( |
| 1302 IDS_PROFILES_END_PREVIEW, this, &end_preview_cancel_button_); | 1304 IDS_PROFILES_END_PREVIEW, this, &end_preview_cancel_button_); |
| 1303 return TitleCard::AddPaddedTitleCard( | 1305 return TitleCard::AddPaddedTitleCard( |
| 1304 view, title_card, kFixedAccountRemovalViewWidth); | 1306 view, title_card, kFixedAccountRemovalViewWidth); |
| 1305 } | 1307 } |
| 1306 | 1308 |
| OLD | NEW |