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

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

Issue 1307093004: Remove references to IsNewAvatarMenu since the flag was removed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review feedback Created 5 years, 2 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 <algorithm> 7 #include <algorithm>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 Profile* profile, 52 Profile* profile,
53 const std::string& username, 53 const std::string& username,
54 ui::ProfileSigninConfirmationDelegate* delegate) { 54 ui::ProfileSigninConfirmationDelegate* delegate) {
55 // Hides the new avatar bubble if it is currently shown. The new avatar bubble 55 // Hides the new avatar bubble if it is currently shown. The new avatar bubble
56 // should be automatically closed when it loses focus. However on windows the 56 // should be automatically closed when it loses focus. However on windows the
57 // profile signin confirmation dialog is not modal yet thus it does not take 57 // profile signin confirmation dialog is not modal yet thus it does not take
58 // away focus, thus as a temporary workaround we need to manually close the 58 // away focus, thus as a temporary workaround we need to manually close the
59 // bubble. 59 // bubble.
60 // TODO(guohui): removes the workaround once the profile confirmation dialog 60 // TODO(guohui): removes the workaround once the profile confirmation dialog
61 // is fixed. 61 // is fixed.
62 if (switches::IsNewAvatarMenu() && ProfileChooserView::IsShowing()) 62 ProfileChooserView::Hide();
63 ProfileChooserView::Hide();
64 63
65 ProfileSigninConfirmationDialogViews* dialog = 64 ProfileSigninConfirmationDialogViews* dialog =
66 new ProfileSigninConfirmationDialogViews( 65 new ProfileSigninConfirmationDialogViews(
67 browser, username, delegate); 66 browser, username, delegate);
68 ui::CheckShouldPromptForNewProfile( 67 ui::CheckShouldPromptForNewProfile(
69 profile, 68 profile,
70 // This callback is guaranteed to be invoked, and once it is, the dialog 69 // This callback is guaranteed to be invoked, and once it is, the dialog
71 // owns itself. 70 // owns itself.
72 base::Bind(&ProfileSigninConfirmationDialogViews::Show, 71 base::Bind(&ProfileSigninConfirmationDialogViews::Show,
73 base::Unretained(dialog))); 72 base::Unretained(dialog)));
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 views::Button* sender, 246 views::Button* sender,
248 const ui::Event& event) { 247 const ui::Event& event) {
249 DCHECK(prompt_for_new_profile_); 248 DCHECK(prompt_for_new_profile_);
250 DCHECK_EQ(continue_signin_button_, sender); 249 DCHECK_EQ(continue_signin_button_, sender);
251 if (delegate_) { 250 if (delegate_) {
252 delegate_->OnContinueSignin(); 251 delegate_->OnContinueSignin();
253 delegate_ = NULL; 252 delegate_ = NULL;
254 } 253 }
255 GetWidget()->Close(); 254 GetWidget()->Close();
256 } 255 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698