Chromium Code Reviews| Index: cc/output/swap_promise.h |
| diff --git a/cc/output/swap_promise.h b/cc/output/swap_promise.h |
| index cf0b88de9ebc5817a4121a79e27b436ebea03086..ca6cd2026c4462d0d7fb6ab80dfaface9a45f182 100644 |
| --- a/cc/output/swap_promise.h |
| +++ b/cc/output/swap_promise.h |
| @@ -61,6 +61,22 @@ class CC_EXPORT SwapPromise { |
| // swap promise. This can be used for registering additional flow steps to |
| // visualize the object's path through the system. |
| virtual int64 TraceId() const = 0; |
| + |
| + static std::string DidNotSwapReasonToString(DidNotSwapReason reason) { |
|
Sami
2015/08/18 11:19:18
Is this used anywhere?
nit: this could just be a
Tobias Sargeant
2015/08/18 13:39:52
It isn't. It was useful during debugging the unitt
|
| + switch (reason) { |
| + case SWAP_FAILS: |
| + return "SWAP_FAILS"; |
| + case COMMIT_FAILS: |
| + return "COMMIT_FAILS"; |
| + case COMMIT_NO_UPDATE: |
| + return "COMMIT_NO_UPDATE"; |
| + case ACTIVATION_FAILS: |
| + return "ACTIVATION_FAILS"; |
| + default: |
| + NOTREACHED(); |
| + return ""; |
| + } |
| + } |
| }; |
| } // namespace cc |