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

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

Issue 10692021: Remove browser::FindLastActiveWithProfile call in login_ui_service.cc by plumbing the Browser* thro… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 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/login_ui_service.cc
===================================================================
--- chrome/browser/ui/webui/signin/login_ui_service.cc (revision 144404)
+++ chrome/browser/ui/webui/signin/login_ui_service.cc (working copy)
@@ -5,15 +5,10 @@
#include "chrome/browser/ui/webui/signin/login_ui_service.h"
#include "chrome/browser/profiles/profile.h"
-#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/browser_finder.h"
-#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/chrome_pages.h"
#include "chrome/common/url_constants.h"
-LoginUIService::LoginUIService(Profile* profile)
- : ui_(NULL),
- profile_(profile) {
+LoginUIService::LoginUIService() : ui_(NULL) {
}
LoginUIService::~LoginUIService() {}
@@ -28,7 +23,7 @@
ui_ = NULL;
}
-void LoginUIService::ShowLoginUI() {
+void LoginUIService::ShowLoginUI(Browser* browser) {
if (ui_) {
// We already have active login UI - make it visible.
ui_->FocusUI();
@@ -36,14 +31,5 @@
}
// Need to navigate to the settings page and display the UI.
- if (profile_) {
- Browser* browser = browser::FindLastActiveWithProfile(profile_);
- if (!browser) {
- browser = Browser::Create(profile_);
- chrome::ShowSettingsSubPage(browser, chrome::kSyncSetupSubPage);
- browser->window()->Show();
- } else {
- chrome::ShowSettingsSubPage(browser, chrome::kSyncSetupSubPage);
- }
- }
+ chrome::ShowSettingsSubPage(browser, chrome::kSyncSetupSubPage);
}

Powered by Google App Engine
This is Rietveld 408576698