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

Side by Side Diff: chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc

Issue 2802703004: Log creation for many dialog box types. (Closed)
Patch Set: qualify RecordDialogCreation with chrome:: Created 3 years, 8 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/sync/profile_signin_confirmation_dialog_views. h" 5 #include "chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views. h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "chrome/browser/ui/browser.h" 12 #include "chrome/browser/ui/browser.h"
13 #include "chrome/browser/ui/browser_dialogs.h"
13 #include "chrome/browser/ui/browser_navigator.h" 14 #include "chrome/browser/ui/browser_navigator.h"
14 #include "chrome/browser/ui/browser_navigator_params.h" 15 #include "chrome/browser/ui/browser_navigator_params.h"
15 #include "chrome/browser/ui/browser_window.h" 16 #include "chrome/browser/ui/browser_window.h"
16 #include "chrome/browser/ui/views/harmony/layout_delegate.h" 17 #include "chrome/browser/ui/views/harmony/layout_delegate.h"
17 #include "chrome/grit/chromium_strings.h" 18 #include "chrome/grit/chromium_strings.h"
18 #include "chrome/grit/generated_resources.h" 19 #include "chrome/grit/generated_resources.h"
19 #include "components/constrained_window/constrained_window_views.h" 20 #include "components/constrained_window/constrained_window_views.h"
20 #include "components/signin/core/common/profile_management_switches.h" 21 #include "components/signin/core/common/profile_management_switches.h"
21 #include "content/public/browser/web_contents.h" 22 #include "content/public/browser/web_contents.h"
22 #include "google_apis/gaia/gaia_auth_util.h" 23 #include "google_apis/gaia/gaia_auth_util.h"
(...skipping 18 matching lines...) Expand all
41 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h" 42 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h"
42 #endif 43 #endif
43 44
44 ProfileSigninConfirmationDialogViews::ProfileSigninConfirmationDialogViews( 45 ProfileSigninConfirmationDialogViews::ProfileSigninConfirmationDialogViews(
45 Browser* browser, 46 Browser* browser,
46 const std::string& username, 47 const std::string& username,
47 std::unique_ptr<ui::ProfileSigninConfirmationDelegate> delegate) 48 std::unique_ptr<ui::ProfileSigninConfirmationDelegate> delegate)
48 : browser_(browser), 49 : browser_(browser),
49 username_(username), 50 username_(username),
50 delegate_(std::move(delegate)), 51 delegate_(std::move(delegate)),
51 prompt_for_new_profile_(true) {} 52 prompt_for_new_profile_(true) {
53 chrome::RecordDialogCreation(chrome::DialogIdentifier::LINK_CHROME_DATA);
54 }
52 55
53 ProfileSigninConfirmationDialogViews::~ProfileSigninConfirmationDialogViews() {} 56 ProfileSigninConfirmationDialogViews::~ProfileSigninConfirmationDialogViews() {}
54 57
55 // static 58 // static
56 void ProfileSigninConfirmationDialogViews::ShowDialog( 59 void ProfileSigninConfirmationDialogViews::ShowDialog(
57 Browser* browser, 60 Browser* browser,
58 Profile* profile, 61 Profile* profile,
59 const std::string& username, 62 const std::string& username,
60 std::unique_ptr<ui::ProfileSigninConfirmationDelegate> delegate) { 63 std::unique_ptr<ui::ProfileSigninConfirmationDelegate> delegate) {
61 #if !defined(OS_MACOSX) || BUILDFLAG(MAC_VIEWS_BROWSER) 64 #if !defined(OS_MACOSX) || BUILDFLAG(MAC_VIEWS_BROWSER)
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 void ProfileSigninConfirmationDialogViews::ButtonPressed( 254 void ProfileSigninConfirmationDialogViews::ButtonPressed(
252 views::Button* sender, 255 views::Button* sender,
253 const ui::Event& event) { 256 const ui::Event& event) {
254 DCHECK(prompt_for_new_profile_); 257 DCHECK(prompt_for_new_profile_);
255 if (delegate_) { 258 if (delegate_) {
256 delegate_->OnContinueSignin(); 259 delegate_->OnContinueSignin();
257 delegate_ = nullptr; 260 delegate_ = nullptr;
258 } 261 }
259 GetWidget()->Close(); 262 GetWidget()->Close();
260 } 263 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698