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

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: Profile helper function, 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
« no previous file with comments | « chrome/browser/ui/webui/sessions_ui.cc ('k') | chrome/browser/ui/webui/tracing_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3c38160ece1a710cefe36d349f0a4e58499138af 100644
--- a/chrome/browser/ui/webui/sync_setup_handler.cc
+++ b/chrome/browser/ui/webui/sync_setup_handler.cc
@@ -301,7 +301,8 @@ 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::FromWebUI(web_ui_);
+ profile->GetProfileSyncService()->signin()->StartOAuthSignIn();
}
void SyncSetupHandler::ShowGaiaLogin(const DictionaryValue& args) {
@@ -432,8 +433,8 @@ void SyncSetupHandler::HandleAttachHandler(const ListValue* args) {
void SyncSetupHandler::HandleShowErrorUI(const ListValue* args) {
DCHECK(!flow_);
- ProfileSyncService* service =
- web_ui_->GetProfile()->GetProfileSyncService();
+ Profile* profile = Profile::FromWebUI(web_ui_);
+ ProfileSyncService* service = profile->GetProfileSyncService();
DCHECK(service);
service->get_wizard().Step(SyncSetupWizard::NONFATAL_ERROR);
@@ -463,7 +464,8 @@ void SyncSetupHandler::OpenSyncSetup() {
DCHECK(web_ui_);
DCHECK(!flow_);
- ProfileSyncService* service = web_ui_->GetProfile()->GetProfileSyncService();
+ Profile* profile = Profile::FromWebUI(web_ui_);
+ 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
« no previous file with comments | « chrome/browser/ui/webui/sessions_ui.cc ('k') | chrome/browser/ui/webui/tracing_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698