Chromium Code Reviews| Index: ui/base/test/test_clipboard.cc |
| diff --git a/ui/base/test/test_clipboard.cc b/ui/base/test/test_clipboard.cc |
| index e90296145c667d416b8b0d2815204732ff94c955..137905f13d90ae09dc6ca5b7055546839e41babf 100644 |
| --- a/ui/base/test/test_clipboard.cc |
| +++ b/ui/base/test/test_clipboard.cc |
| @@ -42,6 +42,22 @@ void TestClipboard::Clear(ClipboardType type) { |
| void TestClipboard::ReadAvailableTypes(ClipboardType type, |
| std::vector<base::string16>* types, |
| bool* contains_filenames) const { |
| + if (!types || !contains_filenames) { |
| + return; |
|
dcheng
2015/07/15 01:04:46
Why add this check? Both |types| and |contains_fil
Tobias Sargeant
2015/07/15 14:04:00
It was a copy from (for example) clipboard_android
|
| + } |
| + |
| + types->clear(); |
| + |
| + if (IsFormatAvailable(Clipboard::GetPlainTextFormatType(), type)) |
| + types->push_back(base::UTF8ToUTF16(kMimeTypeText)); |
| + if (IsFormatAvailable(Clipboard::GetHtmlFormatType(), type)) |
| + types->push_back(base::UTF8ToUTF16(kMimeTypeHTML)); |
| + |
| + if (IsFormatAvailable(Clipboard::GetRtfFormatType(), type)) |
| + types->push_back(base::UTF8ToUTF16(kMimeTypeRTF)); |
| + if (IsFormatAvailable(Clipboard::GetBitmapFormatType(), type)) |
| + types->push_back(base::UTF8ToUTF16(kMimeTypePNG)); |
| + |
| *contains_filenames = false; |
| } |