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

Unified Diff: chrome/browser/automation/testing_automation_provider.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
« no previous file with comments | « chrome/browser/autofill/personal_data_manager.cc ('k') | chrome/browser/chromeos/login/login_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/automation/testing_automation_provider.cc
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index e1e8e46cf101ffe1e0f5c15393cdbc4b0da91ab6..b8e76e545177f39f6d87af6e939c21005a701188 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -82,6 +82,8 @@
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/sessions/restore_tab_helper.h"
#include "chrome/browser/sessions/session_service_factory.h"
+#include "chrome/browser/sync/profile_sync_service.h"
+#include "chrome/browser/sync/profile_sync_service_factory.h"
#include "chrome/browser/tab_contents/confirm_infobar_delegate.h"
#include "chrome/browser/tab_contents/link_infobar_delegate.h"
#include "chrome/browser/themes/theme_service.h"
@@ -5115,7 +5117,8 @@ void TestingAutomationProvider::AwaitFullSyncCompletion(
// Ensure that the profile sync service and sync backend host are initialized
// before waiting for sync cycle completion. In cases where the browser is
// restarted with sync enabled, these operations may still be in flight.
- if (!browser->profile()->GetProfileSyncService()) {
+ if (ProfileSyncServiceFactory::GetInstance()->GetForProfile(
+ browser->profile()) == NULL) {
reply.SendError("ProfileSyncService initialization failed.");
return;
}
@@ -5156,7 +5159,8 @@ void TestingAutomationProvider::AwaitSyncRestart(
reply.SendError("Not signed in to sync");
return;
}
- if (!browser->profile()->GetProfileSyncService()) {
+ if (ProfileSyncServiceFactory::GetInstance()->GetForProfile(
+ browser->profile()) == NULL) {
reply.SendError("ProfileSyncService initialization failed.");
return;
}
« no previous file with comments | « chrome/browser/autofill/personal_data_manager.cc ('k') | chrome/browser/chromeos/login/login_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698