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

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

Issue 2881683002: Log the creation of several more dialog box types. (Closed)
Patch Set: Fix alphabetization errors. Created 3 years, 7 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/account_chooser_dialog_view.h" 5 #include "chrome/browser/ui/views/passwords/account_chooser_dialog_view.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/ui/browser_dialogs.h"
9 #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h" 10 #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h"
10 #include "chrome/browser/ui/passwords/password_dialog_controller.h" 11 #include "chrome/browser/ui/passwords/password_dialog_controller.h"
11 #include "chrome/browser/ui/views/passwords/credentials_item_view.h" 12 #include "chrome/browser/ui/views/passwords/credentials_item_view.h"
12 #include "chrome/grit/generated_resources.h" 13 #include "chrome/grit/generated_resources.h"
13 #include "components/autofill/core/common/password_form.h" 14 #include "components/autofill/core/common/password_form.h"
14 #include "components/constrained_window/constrained_window_views.h" 15 #include "components/constrained_window/constrained_window_views.h"
15 #include "content/public/browser/web_contents.h" 16 #include "content/public/browser/web_contents.h"
16 #include "ui/base/l10n/l10n_util.h" 17 #include "ui/base/l10n/l10n_util.h"
17 #include "ui/base/resource/resource_bundle.h" 18 #include "ui/base/resource/resource_bundle.h"
18 #include "ui/strings/grit/ui_strings.h" 19 #include "ui/strings/grit/ui_strings.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } // namespace 97 } // namespace
97 98
98 AccountChooserDialogView::AccountChooserDialogView( 99 AccountChooserDialogView::AccountChooserDialogView(
99 PasswordDialogController* controller, 100 PasswordDialogController* controller,
100 content::WebContents* web_contents) 101 content::WebContents* web_contents)
101 : controller_(controller), 102 : controller_(controller),
102 web_contents_(web_contents), 103 web_contents_(web_contents),
103 show_signin_button_(false) { 104 show_signin_button_(false) {
104 DCHECK(controller); 105 DCHECK(controller);
105 DCHECK(web_contents); 106 DCHECK(web_contents);
107 chrome::RecordDialogCreation(chrome::DialogIdentifier::ACCOUNT_CHOOSER);
106 } 108 }
107 109
108 AccountChooserDialogView::~AccountChooserDialogView() = default; 110 AccountChooserDialogView::~AccountChooserDialogView() = default;
109 111
110 void AccountChooserDialogView::ShowAccountChooser() { 112 void AccountChooserDialogView::ShowAccountChooser() {
111 show_signin_button_ = controller_->ShouldShowSignInButton(); 113 show_signin_button_ = controller_->ShouldShowSignInButton();
112 InitWindow(); 114 InitWindow();
113 constrained_window::ShowWebModalDialogViews(this, web_contents_); 115 constrained_window::ShowWebModalDialogViews(this, web_contents_);
114 } 116 }
115 117
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 GetProfileFromWebContents(web_contents_)->GetRequestContext())); 219 GetProfileFromWebContents(web_contents_)->GetRequestContext()));
218 // DialogClientView adds kRelatedControlVerticalSpacing padding once more for 220 // DialogClientView adds kRelatedControlVerticalSpacing padding once more for
219 // the buttons. 221 // the buttons.
220 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing); 222 layout->AddPaddingRow(0, views::kRelatedControlVerticalSpacing);
221 } 223 }
222 224
223 AccountChooserPrompt* CreateAccountChooserPromptView( 225 AccountChooserPrompt* CreateAccountChooserPromptView(
224 PasswordDialogController* controller, content::WebContents* web_contents) { 226 PasswordDialogController* controller, content::WebContents* web_contents) {
225 return new AccountChooserDialogView(controller, web_contents); 227 return new AccountChooserDialogView(controller, web_contents);
226 } 228 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/login_handler_views.cc ('k') | chrome/browser/ui/views/passwords/auto_signin_first_run_dialog_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698