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

Unified Diff: chrome/browser/ui/webui/ntp/new_tab_page_sync_handler.cc

Issue 9169096: Remove a bunch of GetProfileSyncService callers to use the new factory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm todos Created 8 years, 11 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 5a33bb26adb39b83a3f3b256beb5bfebda76e110..aa67e57f41b9690ddf67fd064b17e9013f57cfb2 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
@@ -15,6 +15,8 @@
#include "chrome/browser/net/chrome_url_request_context.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/sync/profile_sync_service.h"
+#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/common/pref_names.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/public/browser/web_ui.h"
@@ -56,7 +58,8 @@ NewTabPageSyncHandler::MessageType
}
void NewTabPageSyncHandler::RegisterMessages() {
- sync_service_ = Profile::FromWebUI(web_ui())->GetProfileSyncService();
+ sync_service_ = ProfileSyncServiceFactory::GetInstance()->GetForProfile(
+ Profile::FromWebUI(web_ui()));
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/foreign_session_handler.cc ('k') | chrome/browser/ui/webui/ntp/ntp_login_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698