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

Side by Side Diff: sync/internal_api/sync_backup_manager_unittest.cc

Issue 302173004: sync: Specialize functions that fetch type root (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/GET_BY_SERVER_TAG_DEPRECATED/GET_BY_SERVER_TAG/ Created 6 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
« no previous file with comments | « sync/internal_api/read_node.cc ('k') | sync/internal_api/sync_encryption_handler_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "sync/internal_api/sync_backup_manager.h" 5 #include "sync/internal_api/sync_backup_manager.h"
6 6
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "sync/internal_api/public/read_node.h" 8 #include "sync/internal_api/public/read_node.h"
9 #include "sync/internal_api/public/read_transaction.h" 9 #include "sync/internal_api/public/read_transaction.h"
10 #include "sync/internal_api/public/test/test_internal_components_factory.h" 10 #include "sync/internal_api/public/test/test_internal_components_factory.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 ModelTypeSet(), ModelTypeSet(), ModelTypeSet(), 45 ModelTypeSet(), ModelTypeSet(), ModelTypeSet(),
46 ModelSafeRoutingInfo(), 46 ModelSafeRoutingInfo(),
47 base::Bind(&OnConfigDone, true), 47 base::Bind(&OnConfigDone, true),
48 base::Bind(&OnConfigDone, false)); 48 base::Bind(&OnConfigDone, false));
49 } 49 }
50 50
51 void CreateEntry(UserShare* user_share, ModelType type, 51 void CreateEntry(UserShare* user_share, ModelType type,
52 const std::string& client_tag) { 52 const std::string& client_tag) {
53 WriteTransaction trans(FROM_HERE, user_share); 53 WriteTransaction trans(FROM_HERE, user_share);
54 ReadNode type_root(&trans); 54 ReadNode type_root(&trans);
55 EXPECT_EQ(BaseNode::INIT_OK, 55 EXPECT_EQ(BaseNode::INIT_OK, type_root.InitTypeRoot(type));
56 type_root.InitByTagLookup(ModelTypeToRootTag(type)));
57 56
58 WriteNode node(&trans); 57 WriteNode node(&trans);
59 EXPECT_EQ(WriteNode::INIT_SUCCESS, 58 EXPECT_EQ(WriteNode::INIT_SUCCESS,
60 node.InitUniqueByCreation(type, type_root, client_tag)); 59 node.InitUniqueByCreation(type, type_root, client_tag));
61 } 60 }
62 61
63 base::ScopedTempDir temp_dir_; 62 base::ScopedTempDir temp_dir_;
64 base::MessageLoop loop_; // Needed for WeakHandle 63 base::MessageLoop loop_; // Needed for WeakHandle
65 }; 64 };
66 65
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 pref.InitByClientTagLookup(PREFERENCES, "test")); 102 pref.InitByClientTagLookup(PREFERENCES, "test"));
104 EXPECT_TRUE(pref.GetEntry()->GetId().ServerKnows()); 103 EXPECT_TRUE(pref.GetEntry()->GetId().ServerKnows());
105 EXPECT_FALSE(pref.GetEntry()->GetIsUnsynced()); 104 EXPECT_FALSE(pref.GetEntry()->GetIsUnsynced());
106 } 105 }
107 } 106 }
108 107
109 } // anonymous namespace 108 } // anonymous namespace
110 109
111 } // namespace syncer 110 } // namespace syncer
112 111
OLDNEW
« no previous file with comments | « sync/internal_api/read_node.cc ('k') | sync/internal_api/sync_encryption_handler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698