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

Side by Side Diff: chrome/browser/sync/abstract_profile_sync_service_test.cc

Issue 7190001: [Sync] Split DirectoryChangeListener for thread-safety (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix copyright Created 9 years, 6 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) 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 #include "chrome/browser/sync/abstract_profile_sync_service_test.h" 5 #include "chrome/browser/sync/abstract_profile_sync_service_test.h"
6 6
7 #include "base/tracked.h"
7 #include "chrome/browser/sync/engine/syncapi.h" 8 #include "chrome/browser/sync/engine/syncapi.h"
8 #include "chrome/browser/sync/protocol/sync.pb.h" 9 #include "chrome/browser/sync/protocol/sync.pb.h"
9 #include "chrome/browser/sync/syncable/directory_manager.h" 10 #include "chrome/browser/sync/syncable/directory_manager.h"
10 #include "chrome/browser/sync/syncable/syncable.h" 11 #include "chrome/browser/sync/syncable/syncable.h"
11 #include "chrome/browser/sync/test_profile_sync_service.h" 12 #include "chrome/browser/sync/test_profile_sync_service.h"
12 #include "chrome/browser/sync/util/cryptographer.h" 13 #include "chrome/browser/sync/util/cryptographer.h"
13 #include "chrome/test/sync/engine/test_id_factory.h" 14 #include "chrome/test/sync/engine/test_id_factory.h"
14 15
15 using browser_sync::TestIdFactory; 16 using browser_sync::TestIdFactory;
16 using sync_api::UserShare; 17 using sync_api::UserShare;
(...skipping 23 matching lines...) Expand all
40 ModelType model_type, UserShare* user_share, 41 ModelType model_type, UserShare* user_share,
41 TestIdFactory* ids) { 42 TestIdFactory* ids) {
42 DirectoryManager* dir_manager = user_share->dir_manager.get(); 43 DirectoryManager* dir_manager = user_share->dir_manager.get();
43 44
44 ScopedDirLookup dir(dir_manager, user_share->name); 45 ScopedDirLookup dir(dir_manager, user_share->name);
45 if (!dir.good()) 46 if (!dir.good())
46 return false; 47 return false;
47 48
48 std::string tag_name = GetTagForType(model_type); 49 std::string tag_name = GetTagForType(model_type);
49 50
50 WriteTransaction wtrans(dir, UNITTEST, __FILE__, __LINE__); 51 WriteTransaction wtrans(dir, UNITTEST, FROM_HERE);
51 MutableEntry node(&wtrans, 52 MutableEntry node(&wtrans,
52 CREATE, 53 CREATE,
53 wtrans.root_id(), 54 wtrans.root_id(),
54 tag_name); 55 tag_name);
55 node.Put(UNIQUE_SERVER_TAG, tag_name); 56 node.Put(UNIQUE_SERVER_TAG, tag_name);
56 node.Put(IS_DIR, true); 57 node.Put(IS_DIR, true);
57 node.Put(SERVER_IS_DIR, false); 58 node.Put(SERVER_IS_DIR, false);
58 node.Put(IS_UNSYNCED, false); 59 node.Put(IS_UNSYNCED, false);
59 node.Put(IS_UNAPPLIED_UPDATE, false); 60 node.Put(IS_UNAPPLIED_UPDATE, false);
60 node.Put(SERVER_VERSION, 20); 61 node.Put(SERVER_VERSION, 20);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } 105 }
105 106
106 CreateRootTask::~CreateRootTask() {} 107 CreateRootTask::~CreateRootTask() {}
107 void CreateRootTask::Run() { 108 void CreateRootTask::Run() {
108 success_ = test_->CreateRoot(model_type_); 109 success_ = test_->CreateRoot(model_type_);
109 } 110 }
110 111
111 bool CreateRootTask::success() { 112 bool CreateRootTask::success() {
112 return success_; 113 return success_;
113 } 114 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/sync_internals/chrome_sync.js ('k') | chrome/browser/sync/engine/apply_updates_command.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698