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

Side by Side Diff: chrome/browser/sync/glue/bookmark_model_associator.h

Issue 8828006: Makes all permanent nodes share the same node class so that visibility (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: SetPermanentNodeVisibile Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_SYNC_GLUE_BOOKMARK_MODEL_ASSOCIATOR_H_ 5 #ifndef CHROME_BROWSER_SYNC_GLUE_BOOKMARK_MODEL_ASSOCIATOR_H_
6 #define CHROME_BROWSER_SYNC_GLUE_BOOKMARK_MODEL_ASSOCIATOR_H_ 6 #define CHROME_BROWSER_SYNC_GLUE_BOOKMARK_MODEL_ASSOCIATOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 #include <set> 10 #include <set>
(...skipping 22 matching lines...) Expand all
33 class BookmarkModelAssociator 33 class BookmarkModelAssociator
34 : public PerDataTypeAssociatorInterface<BookmarkNode, int64> { 34 : public PerDataTypeAssociatorInterface<BookmarkNode, int64> {
35 public: 35 public:
36 static syncable::ModelType model_type() { return syncable::BOOKMARKS; } 36 static syncable::ModelType model_type() { return syncable::BOOKMARKS; }
37 BookmarkModelAssociator( 37 BookmarkModelAssociator(
38 BookmarkModel* bookmark_model, 38 BookmarkModel* bookmark_model,
39 sync_api::UserShare* user_share, 39 sync_api::UserShare* user_share,
40 UnrecoverableErrorHandler* unrecoverable_error_handler); 40 UnrecoverableErrorHandler* unrecoverable_error_handler);
41 virtual ~BookmarkModelAssociator(); 41 virtual ~BookmarkModelAssociator();
42 42
43 // Invokes BookmarkModel::SetMobileFolderVisible() based on whether the mobile 43 // Updates the visibility of the mobile node in the BookmarkModel based on
44 // node exists. 44 // whether the mobile node exists.
45 void UpdateMobileNodeVisibility(); 45 void UpdateMobileNodeVisibility();
46 46
47 // AssociatorInterface implementation. 47 // AssociatorInterface implementation.
48 // 48 //
49 // AssociateModels iterates through both the sync and the browser 49 // AssociateModels iterates through both the sync and the browser
50 // bookmark model, looking for matched pairs of items. For any pairs it 50 // bookmark model, looking for matched pairs of items. For any pairs it
51 // finds, it will call AssociateSyncID. For any unmatched items, 51 // finds, it will call AssociateSyncID. For any unmatched items,
52 // MergeAndAssociateModels will try to repair the match, e.g. by adding a new 52 // MergeAndAssociateModels will try to repair the match, e.g. by adding a new
53 // node. After successful completion, the models should be identical and 53 // node. After successful completion, the models should be identical and
54 // corresponding. Returns true on success. On failure of this step, we 54 // corresponding. Returns true on success. On failure of this step, we
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 ScopedRunnableMethodFactory<BookmarkModelAssociator> persist_associations_; 140 ScopedRunnableMethodFactory<BookmarkModelAssociator> persist_associations_;
141 141
142 int number_of_new_sync_nodes_created_at_association_; 142 int number_of_new_sync_nodes_created_at_association_;
143 143
144 DISALLOW_COPY_AND_ASSIGN(BookmarkModelAssociator); 144 DISALLOW_COPY_AND_ASSIGN(BookmarkModelAssociator);
145 }; 145 };
146 146
147 } // namespace browser_sync 147 } // namespace browser_sync
148 148
149 #endif // CHROME_BROWSER_SYNC_GLUE_BOOKMARK_MODEL_ASSOCIATOR_H_ 149 #endif // CHROME_BROWSER_SYNC_GLUE_BOOKMARK_MODEL_ASSOCIATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698