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

Unified Diff: chrome/browser/ui/webui/sync_setup_handler.cc

Issue 7554008: Removal of Profile from content part 6. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 4 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/sync_setup_handler.cc
diff --git a/chrome/browser/ui/webui/sync_setup_handler.cc b/chrome/browser/ui/webui/sync_setup_handler.cc
index f652481598989f490171f67dce6d7e404ef42e88..92013bb910df20267f766be87b5a76811fa1affc 100644
--- a/chrome/browser/ui/webui/sync_setup_handler.cc
+++ b/chrome/browser/ui/webui/sync_setup_handler.cc
@@ -301,7 +301,9 @@ void SyncSetupHandler::RegisterMessages() {
// The current implementation is functional, but fails asthetically.
// TODO(rickcam): Bug 90711: Update UI for OAuth sign-in flow
void SyncSetupHandler::ShowOAuthLogin() {
- web_ui_->GetProfile()->GetProfileSyncService()->signin()->StartOAuthSignIn();
+ Profile* profile =
+ Profile::FromBrowserContext(web_ui_->tab_contents()->browser_context());
+ profile->GetProfileSyncService()->signin()->StartOAuthSignIn();
}
void SyncSetupHandler::ShowGaiaLogin(const DictionaryValue& args) {
@@ -432,8 +434,9 @@ void SyncSetupHandler::HandleAttachHandler(const ListValue* args) {
void SyncSetupHandler::HandleShowErrorUI(const ListValue* args) {
DCHECK(!flow_);
- ProfileSyncService* service =
- web_ui_->GetProfile()->GetProfileSyncService();
+ Profile* profile =
+ Profile::FromBrowserContext(web_ui_->tab_contents()->browser_context());
+ ProfileSyncService* service = profile->GetProfileSyncService();
DCHECK(service);
service->get_wizard().Step(SyncSetupWizard::NONFATAL_ERROR);
@@ -463,7 +466,9 @@ void SyncSetupHandler::OpenSyncSetup() {
DCHECK(web_ui_);
DCHECK(!flow_);
- ProfileSyncService* service = web_ui_->GetProfile()->GetProfileSyncService();
+ Profile* profile =
+ Profile::FromBrowserContext(web_ui_->tab_contents()->browser_context());
+ ProfileSyncService* service = profile->GetProfileSyncService();
if (!service) {
// If there's no sync service, the user tried to manually invoke a syncSetup
// URL, but sync features are disabled. We need to close the overlay for

Powered by Google App Engine
This is Rietveld 408576698