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

Unified Diff: chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.mm

Issue 2787453002: Revert of Use the same browser instance in the sync confirmation dialog. (Closed)
Patch Set: Created 3 years, 9 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/cocoa/profiles/signin_view_controller_delegate_mac.mm
diff --git a/chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.mm b/chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.mm
index e4946ea1ab205aed841aab0ab1dda1295c6a98e4..9741d0f197f245a1351ec5fa18b332f95cadae76 100644
--- a/chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.mm
+++ b/chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.mm
@@ -15,7 +15,6 @@
#include "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sheet.h"
#include "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_window.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
-#include "chrome/browser/ui/webui/signin/sync_confirmation_ui.h"
#include "chrome/common/url_constants.h"
#include "components/signin/core/common/profile_management_switches.h"
#include "content/public/browser/native_web_keyboard_event.h"
@@ -115,21 +114,18 @@
// static
std::unique_ptr<content::WebContents>
SigninViewControllerDelegateMac::CreateSyncConfirmationWebContents(
- Browser* browser) {
+ Profile* profile) {
std::unique_ptr<content::WebContents> web_contents(
content::WebContents::Create(
- content::WebContents::CreateParams(browser->profile())));
+ content::WebContents::CreateParams(profile)));
web_contents->GetController().LoadURL(
GURL(chrome::kChromeUISyncConfirmationURL), content::Referrer(),
ui::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string());
- SyncConfirmationUI* sync_confirmation_ui = static_cast<SyncConfirmationUI*>(
- web_contents->GetWebUI()->GetController());
- sync_confirmation_ui->InitializeMessageHandlerWithBrowser(browser);
NSView* webview = web_contents->GetNativeView();
- [webview setFrameSize:NSMakeSize(kModalDialogWidth,
- GetSyncConfirmationDialogPreferredHeight(
- browser->profile()))];
+ [webview setFrameSize:NSMakeSize(
+ kModalDialogWidth,
+ GetSyncConfirmationDialogPreferredHeight(profile))];
return web_contents;
}
@@ -250,7 +246,7 @@
return new SigninViewControllerDelegateMac(
signin_view_controller,
SigninViewControllerDelegateMac::CreateSyncConfirmationWebContents(
- browser),
+ browser->profile()),
browser,
NSMakeRect(0, 0, kModalDialogWidth,
GetSyncConfirmationDialogPreferredHeight(browser->profile())),

Powered by Google App Engine
This is Rietveld 408576698