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

Unified Diff: chrome/browser/sync/glue/autofill_model_associator.h

Issue 5159001: Rest of the autofill work. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Couple of lint errors sneaked into my previous patch. This is clean of lint errors. Created 10 years 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
Index: chrome/browser/sync/glue/autofill_model_associator.h
diff --git a/chrome/browser/sync/glue/autofill_model_associator.h b/chrome/browser/sync/glue/autofill_model_associator.h
index 63db0e888bb93f9532820cced8c5c6eac8032c25..a68ab421f930a993b4fa6f2a2c3c63c888b13bfb 100644
--- a/chrome/browser/sync/glue/autofill_model_associator.h
+++ b/chrome/browser/sync/glue/autofill_model_associator.h
@@ -18,6 +18,7 @@
#include "chrome/browser/sync/engine/syncapi.h"
#include "chrome/browser/sync/glue/autofill_model_associator2.h"
#include "chrome/browser/sync/glue/model_associator.h"
+#include "chrome/browser/sync/syncable/syncable.h"
tim (not reviewing) 2010/12/13 19:24:33 illegal include
lipalani 2010/12/15 09:08:33 Done.
#include "chrome/browser/sync/protocol/autofill_specifics.pb.h"
#include "chrome/browser/webdata/autofill_entry.h"
@@ -52,17 +53,6 @@ class AutofillModelAssociator
PersonalDataManager* data_manager);
virtual ~AutofillModelAssociator();
- // A task used by this class and the change processor to inform the
- // PersonalDataManager living on the UI thread that it needs to refresh.
- class DoOptimisticRefreshTask : public Task {
- public:
- explicit DoOptimisticRefreshTask(PersonalDataManager* pdm);
- virtual ~DoOptimisticRefreshTask();
- virtual void Run();
- private:
- scoped_refptr<PersonalDataManager> pdm_;
- };
-
// PerDataTypeAssociatorInterface implementation.
//
// Iterates through the sync model looking for matched pairs of items.
@@ -114,13 +104,13 @@ class AutofillModelAssociator
// Returns sync service instance.
ProfileSyncService* sync_service() { return sync_service_; }
- protected:
// Is called to determine if we need to upgrade to the new
// autofillprofile2 data type. If so we need to sync up autofillprofile
// first to the latest available changes on the server and then upgrade
// to autofillprofile2.
- virtual bool HasNotMigratedYet();
+ virtual bool HasNotMigratedYet(const sync_api::BaseTransaction* trans);
+ protected:
// Given a profile from sync db it tries to match the profile against
// one in web db. it ignores the guid and compares the actual data.
AutoFillProfile* FindCorrespondingNodeFromWebDB(
@@ -180,20 +170,12 @@ class AutofillModelAssociator
const sync_api::ReadNode& node,
const std::vector<AutoFillProfile*>& all_profiles_from_db);
- // Helper to insert a sync node for the given AutoFillProfile (e.g. in
- // response to encountering a native profile that doesn't exist yet in the
- // cloud).
- bool MakeNewAutofillProfileSyncNode(
- sync_api::WriteTransaction* trans,
- const sync_api::BaseNode& autofill_root,
- const std::string& tag,
- const AutoFillProfile& profile,
- int64* sync_id);
-
// Called at various points in model association to determine if the
// user requested an abort.
bool IsAbortPending();
+ bool MigrationLoggingEnabled();
+
ProfileSyncService* sync_service_;
WebDatabase* web_database_;
PersonalDataManager* personal_data_;
@@ -207,6 +189,10 @@ class AutofillModelAssociator
// AssociateModels method as soon as possible.
Lock abort_association_pending_lock_;
bool abort_association_pending_;
+ int number_of_entries_created_;
+
+ syncable::AutofillMigrationState
tim (not reviewing) 2010/12/13 19:24:33 shouldn't this be in the autofill_migration.h?
lipalani 2010/12/15 09:08:33 removed. On 2010/12/13 19:24:33, timsteele wrote:
+ autofill_migration_state_;
DISALLOW_COPY_AND_ASSIGN(AutofillModelAssociator);
};

Powered by Google App Engine
This is Rietveld 408576698