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 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 std::string primary_account = | 593 std::string primary_account = |
594 SigninManagerFactory::GetForProfile(browser_->profile())-> | 594 SigninManagerFactory::GetForProfile(browser_->profile())-> |
595 GetAuthenticatedUsername(); | 595 GetAuthenticatedUsername(); |
596 ShowView(primary_account.empty() ? BUBBLE_VIEW_MODE_PROFILE_CHOOSER : | 596 ShowView(primary_account.empty() ? BUBBLE_VIEW_MODE_PROFILE_CHOOSER : |
597 BUBBLE_VIEW_MODE_ACCOUNT_MANAGEMENT, | 597 BUBBLE_VIEW_MODE_ACCOUNT_MANAGEMENT, |
598 avatar_menu_.get()); | 598 avatar_menu_.get()); |
599 } else if (sender == question_mark_button_) { | 599 } else if (sender == question_mark_button_) { |
600 tutorial_mode_ = TUTORIAL_MODE_SEND_FEEDBACK; | 600 tutorial_mode_ = TUTORIAL_MODE_SEND_FEEDBACK; |
601 ShowView(BUBBLE_VIEW_MODE_PROFILE_CHOOSER, avatar_menu_.get()); | 601 ShowView(BUBBLE_VIEW_MODE_PROFILE_CHOOSER, avatar_menu_.get()); |
602 } else if (sender == tutorial_send_feedback_button_) { | 602 } else if (sender == tutorial_send_feedback_button_) { |
| 603 ProfileMetrics::LogProfileUpgradeEnrollment( |
| 604 ProfileMetrics::PROFILE_ENROLLMENT_SEND_FEEDBACK); |
603 chrome::OpenFeedbackDialog(browser_); | 605 chrome::OpenFeedbackDialog(browser_); |
604 } else if (sender == end_preview_and_relaunch_button_) { | 606 } else if (sender == end_preview_and_relaunch_button_) { |
605 ProfileMetrics::LogProfileUpgradeEnrollment( | 607 ProfileMetrics::LogProfileUpgradeEnrollment( |
606 ProfileMetrics::PROFILE_ENROLLMENT_DISABLE_NEW_PROFILE_MGMT); | 608 ProfileMetrics::PROFILE_ENROLLMENT_DISABLE_NEW_PROFILE_MGMT); |
607 profiles::DisableNewProfileManagementPreview(); | 609 profiles::DisableNewProfileManagementPreview(); |
608 } else if (sender == end_preview_cancel_button_) { | 610 } else if (sender == end_preview_cancel_button_) { |
609 tutorial_mode_ = TUTORIAL_MODE_SEND_FEEDBACK; | 611 tutorial_mode_ = TUTORIAL_MODE_SEND_FEEDBACK; |
610 ShowView(BUBBLE_VIEW_MODE_PROFILE_CHOOSER, avatar_menu_.get()); | 612 ShowView(BUBBLE_VIEW_MODE_PROFILE_CHOOSER, avatar_menu_.get()); |
611 } else if (current_profile_photo_ && | 613 } else if (current_profile_photo_ && |
612 sender == current_profile_photo_->change_photo_button()) { | 614 sender == current_profile_photo_->change_photo_button()) { |
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1302 layout->StartRowWithPadding( | 1304 layout->StartRowWithPadding( |
1303 1, 0, 0, views::kUnrelatedControlVerticalSpacing); | 1305 1, 0, 0, views::kUnrelatedControlVerticalSpacing); |
1304 layout->AddView(end_preview_and_relaunch_button_); | 1306 layout->AddView(end_preview_and_relaunch_button_); |
1305 | 1307 |
1306 TitleCard* title_card = new TitleCard( | 1308 TitleCard* title_card = new TitleCard( |
1307 IDS_PROFILES_END_PREVIEW, this, &end_preview_cancel_button_); | 1309 IDS_PROFILES_END_PREVIEW, this, &end_preview_cancel_button_); |
1308 return TitleCard::AddPaddedTitleCard( | 1310 return TitleCard::AddPaddedTitleCard( |
1309 view, title_card, kFixedAccountRemovalViewWidth); | 1311 view, title_card, kFixedAccountRemovalViewWidth); |
1310 } | 1312 } |
1311 | 1313 |
OLD | NEW |