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

Unified Diff: chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc

Issue 10409068: Use browser::ShowWebDialog() directly in MobileSetup rather than using BrowserList. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc
===================================================================
--- chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc (revision 138102)
+++ chrome/browser/ui/webui/chromeos/mobile_setup_dialog.cc (working copy)
@@ -8,11 +8,11 @@
#include "base/memory/singleton.h"
#include "base/utf_string_conversions.h"
#include "chrome/browser/platform_util.h"
-#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/browser_dialogs.h"
-#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/webui/web_dialog_delegate.h"
#include "chrome/common/url_constants.h"
+#include "content/public/browser/browser_thread.h"
#include "grit/generated_resources.h"
#include "ui/base/l10n/l10n_util.h"
@@ -72,10 +72,10 @@
}
void MobileSetupDialogDelegate::ShowDialog() {
- Browser* browser = BrowserList::GetLastActive();
- if (!browser)
- return;
- browser->BrowserShowWebDialog(this, NULL);
+ browser::ShowWebDialog(NULL,
+ ProfileManager::GetDefaultProfileOrOffTheRecord(),
Ben Goodger (Google) 2012/05/22 17:58:30 Is this how you get the active profile on cros?
zel 2012/05/22 18:02:32 I think so, even though GetDefaultProfileOrOffTheR
Nikita (slow) 2012/05/23 19:01:20 This is an ugly hack that we're planning to get ri
+ NULL,
+ this);
}
ui::ModalType MobileSetupDialogDelegate::GetDialogModalType() const {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698