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

Unified Diff: chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc

Issue 14081043: Hook up Autofill Backend interface to SyncableServices (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pure merge Created 7 years, 7 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 | « no previous file | chrome/browser/sync/profile_sync_service_autofill_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc
diff --git a/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc b/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc
index e411c7cb39468002d7e179457a04862f0394d14c..3ef45f662248fd49cb54bc8f1ab9f143b75d39ac 100644
--- a/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc
+++ b/chrome/browser/sync/glue/autofill_data_type_controller_unittest.cc
@@ -31,6 +31,7 @@
#include "testing/gtest/include/gtest/gtest.h"
using autofill::AutofillWebDataService;
+using autofill::AutofillWebDataBackend;
namespace browser_sync {
@@ -41,6 +42,19 @@ using testing::_;
using testing::NiceMock;
using testing::Return;
+class NoOpAutofillBackend : public AutofillWebDataBackend {
+ public:
+ NoOpAutofillBackend() {}
+ virtual ~NoOpAutofillBackend() {}
+ virtual WebDatabase* GetDatabase() OVERRIDE { return NULL; }
+ virtual void AddObserver(
+ autofill::AutofillWebDataServiceObserverOnDBThread* observer) OVERRIDE {}
+ virtual void RemoveObserver(
+ autofill::AutofillWebDataServiceObserverOnDBThread* observer) OVERRIDE {}
+ virtual void RemoveExpiredFormElements() OVERRIDE {}
+ virtual void NotifyOfMultipleAutofillChanges() OVERRIDE {}
+};
+
// Fake WebDataService implementation that stubs out the database loading.
class FakeWebDataService : public AutofillWebDataService {
public:
@@ -120,11 +134,13 @@ class FakeWebDataService : public AutofillWebDataService {
void CreateSyncableService() {
ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::DB));
// These services are deleted in DestroySyncableService().
- AutocompleteSyncableService::CreateForWebDataService(this);
+ AutocompleteSyncableService::CreateForWebDataServiceAndBackend(
+ this,
+ &autofill_backend_);
}
bool is_database_loaded_;
-
+ NoOpAutofillBackend autofill_backend_;
WebDatabaseObserver* observer_;
DISALLOW_COPY_AND_ASSIGN(FakeWebDataService);
« no previous file with comments | « no previous file | chrome/browser/sync/profile_sync_service_autofill_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698