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

Side by Side Diff: chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc

Issue 2138203002: [Signin] Add Signin_Impression_FromPasswordBubble user action for Desktops (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add user actions Created 4 years, 5 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 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/passwords/manage_passwords_bubble_view.h" 5 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "base/timer/timer.h" 9 #include "base/timer/timer.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/ui/browser.h" 11 #include "chrome/browser/ui/browser.h"
12 #include "chrome/browser/ui/browser_finder.h" 12 #include "chrome/browser/ui/browser_finder.h"
13 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" 13 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
14 #include "chrome/browser/ui/views/frame/browser_view.h" 14 #include "chrome/browser/ui/views/frame/browser_view.h"
15 #include "chrome/browser/ui/views/passwords/credentials_item_view.h" 15 #include "chrome/browser/ui/views/passwords/credentials_item_view.h"
16 #include "chrome/browser/ui/views/passwords/credentials_selection_view.h" 16 #include "chrome/browser/ui/views/passwords/credentials_selection_view.h"
17 #include "chrome/browser/ui/views/passwords/manage_password_items_view.h" 17 #include "chrome/browser/ui/views/passwords/manage_password_items_view.h"
18 #include "chrome/browser/ui/views/passwords/manage_passwords_icon_views.h" 18 #include "chrome/browser/ui/views/passwords/manage_passwords_icon_views.h"
19 #include "chrome/grit/generated_resources.h" 19 #include "chrome/grit/generated_resources.h"
20 #include "content/public/browser/user_metrics.h"
20 #include "grit/components_strings.h" 21 #include "grit/components_strings.h"
21 #include "ui/base/l10n/l10n_util.h" 22 #include "ui/base/l10n/l10n_util.h"
22 #include "ui/base/material_design/material_design_controller.h" 23 #include "ui/base/material_design/material_design_controller.h"
23 #include "ui/base/resource/resource_bundle.h" 24 #include "ui/base/resource/resource_bundle.h"
24 #include "ui/views/controls/button/blue_button.h" 25 #include "ui/views/controls/button/blue_button.h"
25 #include "ui/views/controls/button/md_text_button.h" 26 #include "ui/views/controls/button/md_text_button.h"
26 #include "ui/views/controls/link.h" 27 #include "ui/views/controls/link.h"
27 #include "ui/views/controls/link_listener.h" 28 #include "ui/views/controls/link_listener.h"
28 #include "ui/views/controls/separator.h" 29 #include "ui/views/controls/separator.h"
29 #include "ui/views/controls/styled_label.h" 30 #include "ui/views/controls/styled_label.h"
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 this, 587 this,
587 l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_SIGNIN_PROMO_NO_THANKS)); 588 l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_SIGNIN_PROMO_NO_THANKS));
588 589
589 // Button row. 590 // Button row.
590 BuildColumnSet(layout, DOUBLE_BUTTON_COLUMN_SET); 591 BuildColumnSet(layout, DOUBLE_BUTTON_COLUMN_SET);
591 layout->StartRow(0, DOUBLE_BUTTON_COLUMN_SET); 592 layout->StartRow(0, DOUBLE_BUTTON_COLUMN_SET);
592 layout->AddView(signin_button_); 593 layout->AddView(signin_button_);
593 layout->AddView(no_button_); 594 layout->AddView(no_button_);
594 595
595 parent_->set_initially_focused_view(signin_button_); 596 parent_->set_initially_focused_view(signin_button_);
597 content::RecordAction(
598 base::UserMetricsAction("Signin_Impression_FromPasswordBubble"));
596 } 599 }
597 600
598 void ManagePasswordsBubbleView::SignInPromoView::ButtonPressed( 601 void ManagePasswordsBubbleView::SignInPromoView::ButtonPressed(
599 views::Button* sender, 602 views::Button* sender,
600 const ui::Event& event) { 603 const ui::Event& event) {
601 if (sender == signin_button_) 604 if (sender == signin_button_)
602 parent_->model()->OnSignInToChromeClicked(); 605 parent_->model()->OnSignInToChromeClicked();
603 else if (sender == no_button_) 606 else if (sender == no_button_)
604 parent_->model()->OnSkipSignInClicked(); 607 parent_->model()->OnSkipSignInClicked();
605 else 608 else
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
840 AddChildView(new SaveConfirmationView(this)); 843 AddChildView(new SaveConfirmationView(this));
841 } else if (model_.state() == password_manager::ui::AUTO_SIGNIN_STATE) { 844 } else if (model_.state() == password_manager::ui::AUTO_SIGNIN_STATE) {
842 AddChildView(new AutoSigninView(this)); 845 AddChildView(new AutoSigninView(this));
843 } else if (model_.state() == 846 } else if (model_.state() ==
844 password_manager::ui::CHROME_SIGN_IN_PROMO_STATE) { 847 password_manager::ui::CHROME_SIGN_IN_PROMO_STATE) {
845 AddChildView(new SignInPromoView(this)); 848 AddChildView(new SignInPromoView(this));
846 } else { 849 } else {
847 AddChildView(new ManageView(this)); 850 AddChildView(new ManageView(this));
848 } 851 }
849 } 852 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/passwords/signin_promo_view_controller.mm ('k') | tools/metrics/actions/actions.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698