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

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

Issue 9699057: [Sync] Move 'sync' target to sync/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address Tim's comments Created 8 years, 9 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 #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/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/hash_tables.h" 11 #include "base/hash_tables.h"
12 #include "base/location.h" 12 #include "base/location.h"
13 #include "base/message_loop.h" 13 #include "base/message_loop.h"
14 #include "base/utf_string_conversions.h" 14 #include "base/utf_string_conversions.h"
15 #include "chrome/browser/bookmarks/bookmark_model.h" 15 #include "chrome/browser/bookmarks/bookmark_model.h"
16 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
17 #include "chrome/browser/sync/api/sync_error.h" 17 #include "chrome/browser/sync/api/sync_error.h"
18 #include "chrome/browser/sync/glue/bookmark_change_processor.h" 18 #include "chrome/browser/sync/glue/bookmark_change_processor.h"
19 #include "chrome/browser/sync/internal_api/read_node.h" 19 #include "chrome/browser/sync/internal_api/read_node.h"
20 #include "chrome/browser/sync/internal_api/read_transaction.h" 20 #include "chrome/browser/sync/internal_api/read_transaction.h"
21 #include "chrome/browser/sync/internal_api/write_node.h" 21 #include "chrome/browser/sync/internal_api/write_node.h"
22 #include "chrome/browser/sync/internal_api/write_transaction.h" 22 #include "chrome/browser/sync/internal_api/write_transaction.h"
23 #include "chrome/browser/sync/util/cryptographer.h"
24 #include "content/public/browser/browser_thread.h" 23 #include "content/public/browser/browser_thread.h"
24 #include "sync/util/cryptographer.h"
25 25
26 using content::BrowserThread; 26 using content::BrowserThread;
27 27
28 namespace browser_sync { 28 namespace browser_sync {
29 29
30 // The sync protocol identifies top-level entities by means of well-known tags, 30 // The sync protocol identifies top-level entities by means of well-known tags,
31 // which should not be confused with titles. Each tag corresponds to a 31 // which should not be confused with titles. Each tag corresponds to a
32 // singleton instance of a particular top-level node in a user's share; the 32 // singleton instance of a particular top-level node in a user's share; the
33 // tags are consistent across users. The tags allow us to locate the specific 33 // tags are consistent across users. The tags allow us to locate the specific
34 // folders whose contents we care about synchronizing, without having to do a 34 // folders whose contents we care about synchronizing, without having to do a
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 bool BookmarkModelAssociator::CryptoReadyIfNecessary() { 642 bool BookmarkModelAssociator::CryptoReadyIfNecessary() {
643 // We only access the cryptographer while holding a transaction. 643 // We only access the cryptographer while holding a transaction.
644 sync_api::ReadTransaction trans(FROM_HERE, user_share_); 644 sync_api::ReadTransaction trans(FROM_HERE, user_share_);
645 const syncable::ModelTypeSet encrypted_types = 645 const syncable::ModelTypeSet encrypted_types =
646 sync_api::GetEncryptedTypes(&trans); 646 sync_api::GetEncryptedTypes(&trans);
647 return !encrypted_types.Has(syncable::BOOKMARKS) || 647 return !encrypted_types.Has(syncable::BOOKMARKS) ||
648 trans.GetCryptographer()->is_ready(); 648 trans.GetCryptographer()->is_ready();
649 } 649 }
650 650
651 } // namespace browser_sync 651 } // namespace browser_sync
OLDNEW
« no previous file with comments | « chrome/browser/sync/glue/bookmark_model_associator.h ('k') | chrome/browser/sync/glue/bridged_sync_notifier_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698