def startCollab(self, view):
        self.view = view
        self.view.set_read_only(True)
        viewName = self.view.file_name()
        if not viewName == None:
            viewName = os.path.basename(viewName)
        else:
            viewName = 'NONAME'
        totalToSend = self.view.size()
        begin = 0
        end = MAX_CHUNK_SIZE
        # now we make sure we are connected... better way to do this?
        while not self.state == base.STATE_CONNECTED:
            time.sleep(1.0)
            if (self.state == base.STATE_DISCONNECTING) or (self.state == base.STATE_DISCONNECTED):
                self.logger.error('While waiting to share view over a connection the peer was disconnected!')
                self.disconnect()
                return
        self.logger.info('Sharing view %s with %s' % (self.view.file_name(), self.sharingWithUser))
        self.toAck = []
        self.sendMessage(base.SHARE_VIEW, payload=('%s|%s' % (viewName, totalToSend)))
        while begin < totalToSend:
            chunkToSend = self.view.substr(sublime.Region(begin, end))
            self.toAck.append(len(chunkToSend))
            self.sendMessage(base.VIEW_CHUNK, payload=chunkToSend)
            begin = begin + MAX_CHUNK_SIZE
            end = end + MAX_CHUNK_SIZE
            status_bar.progress_message("sending view to %s" % self.sharingWithUser, begin, totalToSend)
        self.sendMessage(base.END_OF_VIEW, payload=view.settings().get('syntax'))
        self.view.set_read_only(False)
        # start the view monitoring thread
        self.viewMonitorThread.start()
Populates data into the stats object.
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/sub_collab/peer/basic.py/BasicPeer.startCollab--crossover with--dataset/ETHPy150Open google/grr/grr/gui/plugins/statistics_test.py/TestStats.PopulateData