| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 package coordinatorTest | 5 package coordinatorTest |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "sort" | 8 "sort" |
| 9 "sync" | 9 "sync" |
| 10 | 10 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 tasks := ap.Tasks() | 60 tasks := ap.Tasks() |
| 61 | 61 |
| 62 taskStreams := make([]string, len(tasks)) | 62 taskStreams := make([]string, len(tasks)) |
| 63 for i, at := range tasks { | 63 for i, at := range tasks { |
| 64 _, name := types.StreamPath(at.Path).Split() | 64 _, name := types.StreamPath(at.Path).Split() |
| 65 taskStreams[i] = string(name) | 65 taskStreams[i] = string(name) |
| 66 } | 66 } |
| 67 sort.Strings(taskStreams) | 67 sort.Strings(taskStreams) |
| 68 return taskStreams | 68 return taskStreams |
| 69 } | 69 } |
| 70 |
| 71 // Clear clears recorded tasks. |
| 72 func (ap *ArchivalPublisher) Clear() { |
| 73 ap.Lock() |
| 74 defer ap.Unlock() |
| 75 ap.tasks = nil |
| 76 } |
| OLD | NEW |