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

Unified Diff: chrome/browser/ui/webui/signin/signin_utils.cc

Issue 2784823002: Reland "Use the same browser instance in the sync confirmation dialog. (Closed)
Patch Set: Rebase and fix conflicts 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/webui/signin/signin_utils.cc
diff --git a/chrome/browser/ui/webui/signin/signin_utils.cc b/chrome/browser/ui/webui/signin/signin_utils.cc
index 75f44599cf282bffe5e1bed30548fe016b71250c..cc398328f6668a1018509ce2381b6a3e77f758a4 100644
--- a/chrome/browser/ui/webui/signin/signin_utils.cc
+++ b/chrome/browser/ui/webui/signin/signin_utils.cc
@@ -65,20 +65,20 @@ Browser* GetDesktopBrowser(content::WebUI* web_ui) {
return browser;
}
-void SetInitializedModalHeight(content::WebUI* web_ui,
+void SetInitializedModalHeight(Browser* browser,
+ content::WebUI* web_ui,
const base::ListValue* args) {
#if defined(OS_CHROMEOS)
NOTREACHED();
#else
+ if (!browser)
+ return;
+
double height;
const bool success = args->GetDouble(0, &height);
DCHECK(success);
-
- Browser* browser = GetDesktopBrowser(web_ui);
- if (browser) {
- browser->signin_view_controller()->SetModalSigninHeight(
- static_cast<int>(height));
- }
+ browser->signin_view_controller()->SetModalSigninHeight(
+ static_cast<int>(height));
#endif
}
« no previous file with comments | « chrome/browser/ui/webui/signin/signin_utils.h ('k') | chrome/browser/ui/webui/signin/sync_confirmation_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698