Index: components/open_from_clipboard/clipboard_recent_content_generic.cc |
diff --git a/components/open_from_clipboard/clipboard_recent_content_generic.cc b/components/open_from_clipboard/clipboard_recent_content_generic.cc |
index 4218ce1f46a06cab6a508622bc88b91a1f0e6442..f8c87cbad073efd4ad87367ccf2b440c6081705e 100644 |
--- a/components/open_from_clipboard/clipboard_recent_content_generic.cc |
+++ b/components/open_from_clipboard/clipboard_recent_content_generic.cc |
@@ -10,17 +10,12 @@ |
ClipboardRecentContentGeneric::ClipboardRecentContentGeneric() {} |
bool ClipboardRecentContentGeneric::GetRecentURLFromClipboard(GURL* url) { |
- ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread(); |
- base::Time last_modified_time = clipboard->GetClipboardLastModifiedTime(); |
- if (!last_modified_time_to_suppress_.is_null() && |
- (last_modified_time == last_modified_time_to_suppress_)) |
- return false; |
- |
if (GetClipboardContentAge() > kMaximumAgeOfClipboard) |
return false; |
// Get and clean up the clipboard before processing. |
std::string gurl_string; |
+ ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread(); |
clipboard->ReadAsciiText(ui::CLIPBOARD_TYPE_COPY_PASTE, &gurl_string); |
base::TrimWhitespaceASCII(gurl_string, base::TrimPositions::TRIM_ALL, |
&gurl_string); |
@@ -64,9 +59,7 @@ base::TimeDelta ClipboardRecentContentGeneric::GetClipboardContentAge() const { |
void ClipboardRecentContentGeneric::SuppressClipboardContent() { |
// User cleared the user data. The pasteboard entry must be removed from the |
- // omnibox list. Do this by suppressing all clipboard content with the |
- // current clipboard content's time. Then we only suggest the clipboard |
- // content later if the time changed. |
- last_modified_time_to_suppress_ = |
- ui::Clipboard::GetForCurrentThread()->GetClipboardLastModifiedTime(); |
+ // omnibox list. Do this by pretending the current clipboard is ancient, |
+ // not recent. |
+ ui::Clipboard::GetForCurrentThread()->ClearClipboardLastModifiedTime(); |
} |