Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Unified Diff: components/open_from_clipboard/clipboard_recent_content_ios.h

Issue 961673004: Add unittest to Open from Clipboard component. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/open_from_clipboard/clipboard_recent_content_ios.h
diff --git a/components/open_from_clipboard/clipboard_recent_content_ios.h b/components/open_from_clipboard/clipboard_recent_content_ios.h
index 062d0f1b6917b668851f0d9bd9bedec5adfbff6d..174166de924a3c03ea3d2f287102d9eaf958a93f 100644
--- a/components/open_from_clipboard/clipboard_recent_content_ios.h
+++ b/components/open_from_clipboard/clipboard_recent_content_ios.h
@@ -12,6 +12,10 @@
@class NSDate;
@class PasteboardNotificationListenerBridge;
+namespace test {
+class ClipboardRecentContentIOSTestHelper;
+}
+
template <typename T>
struct DefaultSingletonTraits;
@@ -25,11 +29,15 @@ class ClipboardRecentContentIOS : public ClipboardRecentContent {
// ClipboardRecentContent implementation.
bool GetRecentURLFromClipboard(GURL* url) const override;
+ protected:
+ // Protected for testing.
+ ClipboardRecentContentIOS();
+ ~ClipboardRecentContentIOS() override;
+
private:
friend struct DefaultSingletonTraits<ClipboardRecentContentIOS>;
+ friend class test::ClipboardRecentContentIOSTestHelper;
- ClipboardRecentContentIOS();
- ~ClipboardRecentContentIOS() override;
// Loads information from the user defaults about the latest pasteboard entry.
void LoadFromUserDefaults();
// Saves information to the user defaults about the latest pasteboard entry.

Powered by Google App Engine
This is Rietveld 408576698