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

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

Issue 10696087: [Sync] Move ModelType and related classes to 'syncer' namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sort headers, update copyrights Created 8 years, 5 months 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 17 matching lines...) Expand all
28 28
29 namespace browser_sync { 29 namespace browser_sync {
30 30
31 // Contains all model association related logic: 31 // Contains all model association related logic:
32 // * Algorithm to associate bookmark model and sync model. 32 // * Algorithm to associate bookmark model and sync model.
33 // * Methods to get a bookmark node for a given sync node and vice versa. 33 // * Methods to get a bookmark node for a given sync node and vice versa.
34 // * Persisting model associations and loading them back. 34 // * Persisting model associations and loading them back.
35 class BookmarkModelAssociator 35 class BookmarkModelAssociator
36 : public PerDataTypeAssociatorInterface<BookmarkNode, int64> { 36 : public PerDataTypeAssociatorInterface<BookmarkNode, int64> {
37 public: 37 public:
38 static syncable::ModelType model_type() { return syncable::BOOKMARKS; } 38 static syncer::ModelType model_type() { return syncer::BOOKMARKS; }
39 // |expect_mobile_bookmarks_folder| controls whether or not we 39 // |expect_mobile_bookmarks_folder| controls whether or not we
40 // expect the mobile bookmarks permanent folder to be created. 40 // expect the mobile bookmarks permanent folder to be created.
41 // Should be set to true only by mobile clients. 41 // Should be set to true only by mobile clients.
42 BookmarkModelAssociator( 42 BookmarkModelAssociator(
43 BookmarkModel* bookmark_model, 43 BookmarkModel* bookmark_model,
44 syncer::UserShare* user_share, 44 syncer::UserShare* user_share,
45 DataTypeErrorHandler* unrecoverable_error_handler, 45 DataTypeErrorHandler* unrecoverable_error_handler,
46 bool expect_mobile_bookmarks_folder); 46 bool expect_mobile_bookmarks_folder);
47 virtual ~BookmarkModelAssociator(); 47 virtual ~BookmarkModelAssociator();
48 48
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 base::WeakPtrFactory<BookmarkModelAssociator> weak_factory_; 148 base::WeakPtrFactory<BookmarkModelAssociator> weak_factory_;
149 149
150 int number_of_new_sync_nodes_created_at_association_; 150 int number_of_new_sync_nodes_created_at_association_;
151 151
152 DISALLOW_COPY_AND_ASSIGN(BookmarkModelAssociator); 152 DISALLOW_COPY_AND_ASSIGN(BookmarkModelAssociator);
153 }; 153 };
154 154
155 } // namespace browser_sync 155 } // namespace browser_sync
156 156
157 #endif // CHROME_BROWSER_SYNC_GLUE_BOOKMARK_MODEL_ASSOCIATOR_H_ 157 #endif // CHROME_BROWSER_SYNC_GLUE_BOOKMARK_MODEL_ASSOCIATOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698