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

Unified Diff: chrome/browser/ui/webui/options2/options_sync_setup_handler2.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/options2/options_sync_setup_handler2.cc
diff --git a/chrome/browser/ui/webui/options2/options_sync_setup_handler2.cc b/chrome/browser/ui/webui/options2/options_sync_setup_handler2.cc
index 7f12258caf6e1f758943879180a532a462ed2bbc..caa8e4f234627806eac29d38972e20b178cd4727 100644
--- a/chrome/browser/ui/webui/options2/options_sync_setup_handler2.cc
+++ b/chrome/browser/ui/webui/options2/options_sync_setup_handler2.cc
@@ -6,6 +6,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sync/profile_sync_service.h"
+#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "content/public/browser/web_ui.h"
namespace options2 {
@@ -18,8 +19,8 @@ OptionsSyncSetupHandler::~OptionsSyncSetupHandler() {
}
void OptionsSyncSetupHandler::StepWizardForShowSetupUI() {
- ProfileSyncService* service =
- Profile::FromWebUI(web_ui())->GetProfileSyncService();
+ ProfileSyncService* service(ProfileSyncServiceFactory::
+ GetInstance()->GetForProfile(Profile::FromWebUI(web_ui())));
DCHECK(service);
// We should bring up either a login or a configure flow based on the state of
@@ -36,8 +37,8 @@ void OptionsSyncSetupHandler::StepWizardForShowSetupUI() {
}
void OptionsSyncSetupHandler::ShowSetupUI() {
- ProfileSyncService* service =
- Profile::FromWebUI(web_ui())->GetProfileSyncService();
+ ProfileSyncService* service(ProfileSyncServiceFactory::
+ GetInstance()->GetForProfile(Profile::FromWebUI(web_ui())));
DCHECK(service);
// The user is trying to manually load a syncSetup URL. We should bring up

Powered by Google App Engine
This is Rietveld 408576698