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

Unified Diff: chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc

Issue 2632123003: Revert of MacViews: Allow the toolkit-views Enterprise Signin Confirmation Dialog to be used (Closed)
Patch Set: Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc
diff --git a/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc b/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc
index 774b60956331a6c48eb75ee6e8197a70b75ba1d7..1ee37beef818dcebd047089e0f82086eb244dc6e 100644
--- a/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc
+++ b/chrome/browser/ui/views/sync/profile_signin_confirmation_dialog_views.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/ui/browser_navigator.h"
#include "chrome/browser/ui/browser_navigator_params.h"
#include "chrome/browser/ui/browser_window.h"
+#include "chrome/browser/ui/views/profiles/profile_chooser_view.h"
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
#include "components/constrained_window/constrained_window_views.h"
@@ -21,7 +22,6 @@
#include "google_apis/gaia/gaia_auth_util.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/l10n/l10n_util.h"
-#include "ui/base/ui_features.h"
#include "ui/gfx/font.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/range/range.h"
@@ -36,17 +36,13 @@
#include "ui/views/widget/widget.h"
#include "ui/views/window/dialog_client_view.h"
-#if !defined(OS_MACOSX) || BUILDFLAG(MAC_VIEWS_BROWSER)
-#include "chrome/browser/ui/views/profiles/profile_chooser_view.h"
-#endif
-
ProfileSigninConfirmationDialogViews::ProfileSigninConfirmationDialogViews(
Browser* browser,
const std::string& username,
- std::unique_ptr<ui::ProfileSigninConfirmationDelegate> delegate)
+ ui::ProfileSigninConfirmationDelegate* delegate)
: browser_(browser),
username_(username),
- delegate_(std::move(delegate)),
+ delegate_(delegate),
prompt_for_new_profile_(true) {}
ProfileSigninConfirmationDialogViews::~ProfileSigninConfirmationDialogViews() {}
@@ -56,8 +52,7 @@
Browser* browser,
Profile* profile,
const std::string& username,
- std::unique_ptr<ui::ProfileSigninConfirmationDelegate> delegate) {
-#if !defined(OS_MACOSX) || BUILDFLAG(MAC_VIEWS_BROWSER)
+ ui::ProfileSigninConfirmationDelegate* delegate) {
// Hides the new avatar bubble if it is currently shown. The new avatar bubble
// should be automatically closed when it loses focus. However on windows the
// profile signin confirmation dialog is not modal yet thus it does not take
@@ -66,11 +61,10 @@
// TODO(guohui): removes the workaround once the profile confirmation dialog
// is fixed.
ProfileChooserView::Hide();
-#endif
ProfileSigninConfirmationDialogViews* dialog =
- new ProfileSigninConfirmationDialogViews(browser, username,
- std::move(delegate));
+ new ProfileSigninConfirmationDialogViews(
+ browser, username, delegate);
ui::CheckShouldPromptForNewProfile(
profile,
// This callback is guaranteed to be invoked, and once it is, the dialog
@@ -123,7 +117,7 @@
delegate_->OnSigninWithNewProfile();
else
delegate_->OnContinueSignin();
- delegate_ = nullptr;
+ delegate_ = NULL;
}
return true;
}
@@ -131,7 +125,7 @@
bool ProfileSigninConfirmationDialogViews::Cancel() {
if (delegate_) {
delegate_->OnCancelSignin();
- delegate_ = nullptr;
+ delegate_ = NULL;
}
return true;
}
@@ -252,7 +246,7 @@
DCHECK(prompt_for_new_profile_);
if (delegate_) {
delegate_->OnContinueSignin();
- delegate_ = nullptr;
+ delegate_ = NULL;
}
GetWidget()->Close();
}

Powered by Google App Engine
This is Rietveld 408576698