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

Unified Diff: chrome/browser/ui/webui/ntp/new_tab_page_sync_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
Index: chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc b/chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc
index 0cf46ff67e6d571947bd72f0d7ba97033df431e7..33eea81681d2612ec6c54eafd33d21575bacaff4 100644
--- a/chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc
+++ b/chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc
@@ -98,7 +98,7 @@ NewTabPageSyncHandler::MessageType
}
WebUIMessageHandler* NewTabPageSyncHandler::Attach(WebUI* web_ui) {
- sync_service_ = web_ui->GetProfile()->GetProfileSyncService();
+ sync_service_ = Profile::FromWebUI(web_ui)->GetProfileSyncService();
DCHECK(sync_service_); // This shouldn't get called by an incognito NTP.
DCHECK(!sync_service_->IsManaged()); // And neither if sync is managed.
sync_service_->AddObserver(this);
« no previous file with comments | « chrome/browser/ui/webui/ntp/new_tab_page_handler.cc ('k') | chrome/browser/ui/webui/ntp/new_tab_sync_setup_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698