Chromium Code Reviews| Index: chrome/browser/sync/glue/typed_url_model_associator.h |
| diff --git a/chrome/browser/sync/glue/typed_url_model_associator.h b/chrome/browser/sync/glue/typed_url_model_associator.h |
| index acba608e6ec4fb95483ce5731b3521bf0c5b4ffa..ad49b4f7f33de93e3119b0cfc661dff196856e6a 100644 |
| --- a/chrome/browser/sync/glue/typed_url_model_associator.h |
| +++ b/chrome/browser/sync/glue/typed_url_model_associator.h |
| @@ -50,7 +50,8 @@ class TypedUrlModelAssociator |
| typedef std::vector<history::URLRow> TypedUrlVector; |
| typedef std::vector<std::pair<history::URLID, history::URLRow> > |
| TypedUrlUpdateVector; |
| - typedef std::vector<std::pair<GURL, std::vector<base::Time> > > |
| + typedef std::pair<base::Time, PageTransition::Type> TypedUrlVisitInfo; |
| + typedef std::vector<std::pair<GURL, std::vector<TypedUrlVisitInfo> > > |
| TypedUrlVisitVector; |
| static syncable::ModelType model_type() { return syncable::TYPED_URLS; } |
| @@ -109,18 +110,18 @@ class TypedUrlModelAssociator |
| // No changes were noted. |
| DIFF_NONE = 0x0000, |
| - // Data was modified in the sync node. |
| - DIFF_NODE_CHANGED = 0x0001, |
| + // The local sync node needs to be modified. |
| + DIFF_UPDATE_NODE = 0x0001, |
| // The title changed in the local URLRow. DIFF_ROW_CHANGED will also be set |
| // if this is set. |
| - DIFF_TITLE_CHANGED = 0x0002, |
| + DIFF_LOCAL_TITLE_CHANGED = 0x0002, |
| // The local URLRow has changed (typed_count, visit_count, title, etc). |
| - DIFF_ROW_CHANGED = 0x0004, |
| + DIFF_LOCAL_ROW_CHANGED = 0x0004, |
| // Visits need to be added to the local URLRow. |
| - DIFF_VISITS_ADDED = 0x0008, |
| + DIFF_LOCAL_VISITS_ADDED = 0x0008, |
| }; |
| // Merges the URL information in |typed_url| with the URL information from the |
| @@ -139,19 +140,19 @@ class TypedUrlModelAssociator |
| const history::URLRow& url, |
| history::VisitVector* visits, |
| history::URLRow* new_url, |
| - std::vector<base::Time>* new_visits); |
| + std::vector<TypedUrlVisitInfo>* new_visits); |
| static void WriteToSyncNode(const history::URLRow& url, |
| const history::VisitVector& visits, |
| sync_api::WriteNode* node); |
| static void DiffVisits(const history::VisitVector& old_visits, |
| const sync_pb::TypedUrlSpecifics& new_url, |
| - std::vector<base::Time>* new_visits, |
| + std::vector<TypedUrlVisitInfo>* new_visits, |
| history::VisitVector* removed_visits); |
| // Initializes the passed |url_row| based on the values in |specifics|. |
|
Nicolas Zea
2011/06/09 19:50:39
It no longer fully initializes it right (see previ
Andrew T Wilson (Slow)
2011/06/09 22:11:36
Done.
|
| - static history::URLRow TypedUrlSpecificsToURLRow( |
| - const sync_pb::TypedUrlSpecifics& specifics); |
| + static void TypedUrlSpecificsToURLRow( |
| + const sync_pb::TypedUrlSpecifics& specifics, history::URLRow* url_row); |
| private: |
| typedef std::map<std::string, int64> TypedUrlToSyncIdMap; |