| Index: components/open_from_clipboard/clipboard_recent_content.h
|
| diff --git a/components/open_from_clipboard/clipboard_recent_content.h b/components/open_from_clipboard/clipboard_recent_content.h
|
| index 46e3449c3055a909c4527437c74a6a1650c7868b..20f5943c8306cc35553e760bdd7319101f067860 100644
|
| --- a/components/open_from_clipboard/clipboard_recent_content.h
|
| +++ b/components/open_from_clipboard/clipboard_recent_content.h
|
| @@ -9,8 +9,7 @@
|
|
|
| #include "base/macros.h"
|
| #include "base/time/time.h"
|
| -
|
| -class GURL;
|
| +#include "url/gurl.h"
|
|
|
| // Helper class returning an URL if the content of the clipboard can be turned
|
| // into an URL, and if it estimates that the content of the clipboard is not too
|
| @@ -28,9 +27,9 @@ class ClipboardRecentContent {
|
| // Sets the global instance of ClipboardRecentContent singleton.
|
| static void SetInstance(ClipboardRecentContent* instance);
|
|
|
| - // Returns true if the clipboard contains a recent URL that has not been
|
| - // supressed, and copies it in |url|. Otherwise, returns false. |url| must not
|
| - // be null.
|
| + // Returns true if the clipboard contains a recent URL that is appropriate to
|
| + // be suggested and has not been supressed, and copies it in |url|.
|
| + // Otherwise, returns false. |url| must not be null.
|
| virtual bool GetRecentURLFromClipboard(GURL* url) = 0;
|
|
|
| // Returns how old the content of the clipboard is.
|
| @@ -40,6 +39,14 @@ class ClipboardRecentContent {
|
| // clipboard's content changed.
|
| virtual void SuppressClipboardContent() = 0;
|
|
|
| + protected:
|
| + // GetRecentURLFromClipboard() should never return a URL from a clipboard
|
| + // older than this.
|
| + static const base::TimeDelta kMaximumAgeOfClipboard;
|
| +
|
| + // Returns true if the URL is appropriate to be suggested.
|
| + static bool IsAppropriateSuggestion(const GURL& url);
|
| +
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(ClipboardRecentContent);
|
| };
|
|
|