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

Unified Diff: chrome/browser/autofill/personal_data_manager.cc

Issue 10910071: Extract abstract base to API directory for ProfileSyncService. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More unit test fixes. Created 8 years, 3 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.h ('k') | chrome/browser/chromeos/login/user_manager_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/personal_data_manager.cc
diff --git a/chrome/browser/autofill/personal_data_manager.cc b/chrome/browser/autofill/personal_data_manager.cc
index d15b85f153d22580a235bac1d43364b3f9a9e0bd..9be39c145d125c0432dec8920175ed9ef3757eab 100644
--- a/chrome/browser/autofill/personal_data_manager.cc
+++ b/chrome/browser/autofill/personal_data_manager.cc
@@ -10,6 +10,9 @@
#include "base/logging.h"
#include "base/string_number_conversions.h"
#include "base/utf_string_conversions.h"
+#include "chrome/browser/api/prefs/pref_service_base.h"
+#include "chrome/browser/api/sync/profile_sync_service_base.h"
+#include "chrome/browser/api/webdata/autofill_web_data_service.h"
#include "chrome/browser/autofill/autofill-inl.h"
#include "chrome/browser/autofill/autofill_field.h"
#include "chrome/browser/autofill/autofill_metrics.h"
@@ -19,12 +22,9 @@
#include "chrome/browser/autofill/phone_number.h"
#include "chrome/browser/autofill/phone_number_i18n.h"
#include "chrome/browser/autofill/select_control_handler.h"
-#include "chrome/browser/api/prefs/pref_service_base.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/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
+#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_source.h"
@@ -166,9 +166,8 @@ void PersonalDataManager::OnWebDataServiceRequestDone(
// As all Autofill data is ready, the Autocomplete data is ready as well.
// If sync is not set, cull older entries of the autocomplete. Otherwise,
// the entries will be culled when sync is connected.
- ProfileSyncService* sync_service =
- ProfileSyncServiceFactory::GetInstance()->GetForProfile(
- static_cast<Profile*>(browser_context_));
+ ProfileSyncServiceBase* sync_service =
+ ProfileSyncServiceBase::ForContext(browser_context_);
if (sync_service && (!sync_service->HasSyncSetupCompleted() ||
!PrefServiceBase::ForContext(
browser_context_)->GetBoolean(
@@ -208,9 +207,8 @@ void PersonalDataManager::OnStateChanged() {
return;
}
- ProfileSyncService* sync_service =
- ProfileSyncServiceFactory::GetInstance()->GetForProfile(
- static_cast<Profile*>(browser_context_));
+ ProfileSyncServiceBase* sync_service =
+ ProfileSyncServiceBase::ForContext(browser_context_);
if (!sync_service)
return;
@@ -924,9 +922,8 @@ void PersonalDataManager::EmptyMigrationTrash() {
return;
}
- ProfileSyncService* sync_service =
- ProfileSyncServiceFactory::GetInstance()->GetForProfile(
- static_cast<Profile*>(browser_context_));
+ ProfileSyncServiceBase* sync_service =
+ ProfileSyncServiceBase::ForContext(browser_context_);
if (!sync_service)
return;
« no previous file with comments | « chrome/browser/autofill/personal_data_manager.h ('k') | chrome/browser/chromeos/login/user_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698