OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "chrome/browser/sync/glue/bookmark_model_associator.h" | 5 #include "chrome/browser/sync/glue/bookmark_model_associator.h" |
6 | 6 |
7 #include <stack> | 7 #include <stack> |
8 | 8 |
9 #include "base/hash_tables.h" | 9 #include "base/hash_tables.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
11 #include "base/task.h" | 11 #include "base/task.h" |
12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
13 #include "chrome/browser/bookmarks/bookmark_model.h" | 13 #include "chrome/browser/bookmarks/bookmark_model.h" |
14 #include "chrome/browser/browser_thread.h" | 14 #include "chrome/browser/browser_thread.h" |
15 #include "chrome/browser/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/sync/engine/syncapi.h" | 16 #include "chrome/browser/sync/engine/syncapi.h" |
17 #include "chrome/browser/sync/glue/bookmark_change_processor.h" | 17 #include "chrome/browser/sync/glue/bookmark_change_processor.h" |
18 #include "chrome/browser/sync/profile_sync_service.h" | 18 #include "chrome/browser/sync/profile_sync_service.h" |
19 | 19 |
20 namespace browser_sync { | 20 namespace browser_sync { |
21 | 21 |
22 // The sync protocol identifies top-level entities by means of well-known tags, | 22 // The sync protocol identifies top-level entities by means of well-known tags, |
23 // which should not be confused with titles. Each tag corresponds to a | 23 // which should not be confused with titles. Each tag corresponds to a |
24 // singleton instance of a particular top-level node in a user's share; the | 24 // singleton instance of a particular top-level node in a user's share; the |
25 // tags are consistent across users. The tags allow us to locate the specific | 25 // tags are consistent across users. The tags allow us to locate the specific |
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 | 540 |
541 // It's possible that the number of nodes in the bookmark model is not the | 541 // It's possible that the number of nodes in the bookmark model is not the |
542 // same as number of nodes in the sync model. This can happen when the sync | 542 // same as number of nodes in the sync model. This can happen when the sync |
543 // model doesn't get a chance to persist its changes, for example when | 543 // model doesn't get a chance to persist its changes, for example when |
544 // Chrome does not shut down gracefully. In such cases we can't trust the | 544 // Chrome does not shut down gracefully. In such cases we can't trust the |
545 // loaded associations. | 545 // loaded associations. |
546 return sync_node_count == id_index.count(); | 546 return sync_node_count == id_index.count(); |
547 } | 547 } |
548 | 548 |
549 } // namespace browser_sync | 549 } // namespace browser_sync |
OLD | NEW |