| Index: chrome/browser/sync/glue/autofill_profile_model_associator.h
|
| diff --git a/chrome/browser/sync/glue/autofill_profile_model_associator.h b/chrome/browser/sync/glue/autofill_profile_model_associator.h
|
| index 048b5a45855c8abca4987fd44953d4ab9a437340..d9cd924000a9dce36bc8437adbfae170dcc39b48 100644
|
| --- a/chrome/browser/sync/glue/autofill_profile_model_associator.h
|
| +++ b/chrome/browser/sync/glue/autofill_profile_model_associator.h
|
| @@ -2,6 +2,7 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| +
|
| #ifndef CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_MODEL_ASSOCIATOR_H_
|
| #define CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_MODEL_ASSOCIATOR_H_
|
| #pragma once
|
| @@ -31,6 +32,8 @@ class WriteTransaction;
|
|
|
| namespace browser_sync {
|
|
|
| +extern const char kAutofillProfileTag[];
|
| +
|
| class AutofillChangeProcessor;
|
| class UnrecoverableErrorHandler;
|
|
|
| @@ -70,10 +73,7 @@ class AutofillProfileModelAssociator
|
| // See ModelAssociator interface.
|
| virtual void AbortAssociation();
|
|
|
| - virtual const std::string* GetChromeNodeFromSyncId(
|
| - int64 sync_id) {
|
| - return NULL;
|
| - }
|
| + virtual const std::string* GetChromeNodeFromSyncId(int64 sync_id);
|
|
|
| virtual bool InitSyncNodeFromChromeId(const std::string& node_id,
|
| sync_api::BaseNode* sync_node) {
|
| @@ -94,13 +94,15 @@ class AutofillProfileModelAssociator
|
| // given permanent tag was found and update
|
| // |sync_id| with that node's id. No current use. To Implement
|
| // only for completeness.
|
| - virtual bool GetSyncIdForTaggedNode(const std::string& tag, int64* sync_id) {
|
| - return false;
|
| - }
|
| + virtual bool GetSyncIdForTaggedNode(const std::string& tag, int64* sync_id);
|
|
|
| // Returns sync service instance.
|
| ProfileSyncService* sync_service() { return sync_service_; }
|
|
|
| + static bool OverwriteProfileWithServerData(
|
| + AutoFillProfile* merge_into,
|
| + const sync_pb::AutofillProfileSpecifics& specifics);
|
| +
|
| protected:
|
| AutofillProfileModelAssociator() {}
|
| bool TraverseAndAssociateChromeAutoFillProfiles(
|
| @@ -112,6 +114,7 @@ class AutofillProfileModelAssociator
|
| std::vector<AutoFillProfile*>* new_profiles,
|
| std::vector<std::string>* profiles_to_delete);
|
|
|
| +
|
| // Helper to insert an AutoFillProfile into the WebDatabase (e.g. in response
|
| // to encountering a sync node that doesn't exist yet locally).
|
| virtual void AddNativeProfileIfNeeded(
|
| @@ -137,10 +140,6 @@ class AutofillProfileModelAssociator
|
| const sync_api::ReadNode& autofill_root,
|
| DataBundle* bundle);
|
|
|
| - static bool OverwriteProfileWithServerData(
|
| - AutoFillProfile* merge_into,
|
| - const sync_pb::AutofillProfileSpecifics& specifics);
|
| -
|
| private:
|
| typedef std::map<std::string, int64> AutofillToSyncIdMap;
|
| typedef std::map<int64, std::string> SyncIdToAutofillMap;
|
| @@ -168,6 +167,8 @@ class AutofillProfileModelAssociator
|
| const sync_api::BaseNode& autofill_root,
|
| const AutoFillProfile& profile);
|
|
|
| + bool MigrationLoggingEnabled();
|
| +
|
| ProfileSyncService* sync_service_;
|
| WebDatabase* web_database_;
|
| PersonalDataManager* personal_data_;
|
| @@ -182,6 +183,8 @@ class AutofillProfileModelAssociator
|
| Lock abort_association_pending_lock_;
|
| bool abort_association_pending_;
|
|
|
| + int number_of_profiles_created_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(AutofillProfileModelAssociator);
|
| };
|
|
|
| @@ -196,3 +199,4 @@ struct AutofillProfileModelAssociator::DataBundle {
|
| } // namespace browser_sync
|
|
|
| #endif // CHROME_BROWSER_SYNC_GLUE_AUTOFILL_PROFILE_MODEL_ASSOCIATOR_H_
|
| +
|
|
|