Chromium Code Reviews| Index: chrome/browser/webdata/autofill_profile_syncable_service.h |
| diff --git a/chrome/browser/webdata/autofill_profile_syncable_service.h b/chrome/browser/webdata/autofill_profile_syncable_service.h |
| index 6f0a831b3ceba1bcaddb7042295b46b960c8f0f6..990cac80cceb740cf39a5ea1d7339b0eeb2fa25f 100644 |
| --- a/chrome/browser/webdata/autofill_profile_syncable_service.h |
| +++ b/chrome/browser/webdata/autofill_profile_syncable_service.h |
| @@ -106,16 +106,18 @@ class AutofillProfileSyncableService |
| // Made virtual for ease of mocking in the unit-test. |
| virtual bool SaveChangesToWebData(const DataBundle& bundle); |
| + // For unit-tests. |
|
Evan Stade
2013/06/11 21:38:44
nit: why the hyphen
Ilya Sherman
2013/06/11 21:53:42
Done.
|
| + AutofillProfileSyncableService(); |
| + void set_sync_processor(syncer::SyncChangeProcessor* sync_processor) { |
| + sync_processor_.reset(sync_processor); |
| + } |
| + |
| + // Creates syncer::SyncData based on supplied |profile|. |
| + // Exposed for unit tests. |
| + static syncer::SyncData CreateData(const autofill::AutofillProfile& profile); |
| + |
| private: |
| friend class ProfileSyncServiceAutofillTest; |
| - friend class MockAutofillProfileSyncableService; |
| - FRIEND_TEST_ALL_PREFIXES(AutofillProfileSyncableServiceTest, |
| - MergeDataAndStartSyncing); |
| - FRIEND_TEST_ALL_PREFIXES(AutofillProfileSyncableServiceTest, GetAllSyncData); |
| - FRIEND_TEST_ALL_PREFIXES(AutofillProfileSyncableServiceTest, |
| - ProcessSyncChanges); |
| - FRIEND_TEST_ALL_PREFIXES(AutofillProfileSyncableServiceTest, |
| - ActOnChange); |
| FRIEND_TEST_ALL_PREFIXES(AutofillProfileSyncableServiceTest, |
| UpdateField); |
| FRIEND_TEST_ALL_PREFIXES(AutofillProfileSyncableServiceTest, |
| @@ -156,9 +158,6 @@ class AutofillProfileSyncableService |
| // Syncs |change| to the cloud. |
| void ActOnChange(const autofill::AutofillProfileChange& change); |
| - // Creates syncer::SyncData based on supplied |profile|. |
| - static syncer::SyncData CreateData(const autofill::AutofillProfile& profile); |
| - |
| autofill::AutofillTable* GetAutofillTable() const; |
| // Helper to compare the local value and cloud value of a field, copy into |
| @@ -174,17 +173,14 @@ class AutofillProfileSyncableService |
| // Calls merge_into->OverwriteWithOrAddTo() and then checks if the |
| // |merge_into| has extra data. Returns |true| if |merge_into| posseses some |
| - // multi-valued field values that are not in |merge_from|, false otherwise. |
| + // multi-valued field values that are not in |merge_from| or if the origins |
| + // of the two profiles differ, false otherwise. |
| + // TODO(isherman): Seems like this should return |true| if |merge_into| was |
| + // modified at all: http://crbug.com/248440 |
| static bool MergeProfile(const autofill::AutofillProfile& merge_from, |
| autofill::AutofillProfile* merge_into, |
| const std::string& app_locale); |
| - // For unit-tests. |
| - AutofillProfileSyncableService(); |
| - void set_sync_processor(syncer::SyncChangeProcessor* sync_processor) { |
| - sync_processor_.reset(sync_processor); |
| - } |
| - |
| autofill::AutofillWebDataBackend* webdata_backend_; // WEAK |
| std::string app_locale_; |
| ScopedObserver<autofill::AutofillWebDataBackend, |