sync_load/sync_load.cc
// Makes a non-folder child of a non-root node. Returns the id of the
// newly-created node.
Makes a non-folder child of a non-root node. Returns the id of the
newly-created node.
Makes a non - folder child of a non - root node . Returns the id of the newly - created node .
int64 EntityCreationTasks::MakeNodeWithParent(ModelType model_type,
                         const std::string& client_tag,
                         int64 parent_id) {
  UserShare* share = sync_manager_->GetUserShare();
  WriteTransaction trans(FROM_HERE, share);
  ReadNode parent_node(&trans);
  parent_node.InitByIdLookup(parent_id);
  WriteNode node(&trans);
  node.InitUniqueByCreation(model_type, parent_node, client_tag);
  node.SetIsFolder(false);
  return node.GetId();
}
int64 EntityCreationTasks :: MakeNodeWithParent ( ModelType model_type , const std :: string & client_tag , int64 parent_id ) { UserShare * share = sync_manager_ -> GetUserShare ( ) ; WriteTransaction trans ( FROM_HERE , share ) ; ReadNode parent_node ( & trans ) ; parent_node . InitByIdLookup ( parent_id ) ; WriteNode node ( & trans ) ; node . InitUniqueByCreation ( model_type , parent_node , client_tag ) ; node . SetIsFolder ( false ) ; return node . GetId ( ) ; }
Makes a non-folder child of a non-root node.
Makes a non - folder child of a non - root node .
//EXPECT_EQ(BaseNode::INIT_OK, parent_node.InitByIdLookup(parent_id)); //WriteNode::InitUniqueByCreationResult result = //EXPECT_EQ(WriteNode::INIT_SUCCESS, result);