| Index: components/open_from_clipboard/clipboard_recent_content_ios.mm
|
| diff --git a/components/open_from_clipboard/clipboard_recent_content_ios.mm b/components/open_from_clipboard/clipboard_recent_content_ios.mm
|
| index 4cc2ed579532fd5626e2292c81bfee84a26f6151..7b14bff228253117f7e846b4e115246c5ac74b5c 100644
|
| --- a/components/open_from_clipboard/clipboard_recent_content_ios.mm
|
| +++ b/components/open_from_clipboard/clipboard_recent_content_ios.mm
|
| @@ -100,17 +100,14 @@ bool ClipboardRecentContentIOS::GetRecentURLFromClipboard(GURL* url) const {
|
| }
|
|
|
| void ClipboardRecentContentIOS::PasteboardChanged() {
|
| - if ([UIPasteboard generalPasteboard].changeCount !=
|
| - lastPasteboardChangeCount_) {
|
| - urlFromPasteboardCache_ = URLFromPasteboard();
|
| - if (!urlFromPasteboardCache_.is_empty()) {
|
| - base::RecordAction(
|
| - base::UserMetricsAction("MobileOmniboxClipboardChanged"));
|
| - }
|
| - lastPasteboardChangeDate_.reset([[NSDate date] retain]);
|
| - lastPasteboardChangeCount_ = [UIPasteboard generalPasteboard].changeCount;
|
| - SaveToUserDefaults();
|
| + urlFromPasteboardCache_ = URLFromPasteboard();
|
| + if (!urlFromPasteboardCache_.is_empty()) {
|
| + base::RecordAction(
|
| + base::UserMetricsAction("MobileOmniboxClipboardChanged"));
|
| }
|
| + lastPasteboardChangeDate_.reset([[NSDate date] retain]);
|
| + lastPasteboardChangeCount_ = [UIPasteboard generalPasteboard].changeCount;
|
| + SaveToUserDefaults();
|
| }
|
|
|
| ClipboardRecentContentIOS::ClipboardRecentContentIOS()
|
| @@ -124,7 +121,7 @@ ClipboardRecentContentIOS::ClipboardRecentContentIOS()
|
| NSInteger changeCount = [UIPasteboard generalPasteboard].changeCount;
|
| if (changeCount != lastPasteboardChangeCount_ ||
|
| DeviceRestartedSincePasteboardChanged()) {
|
| - PasteboardChanged();
|
| + PasteboardChanged();
|
| }
|
| notificationBridge_.reset(
|
| [[PasteboardNotificationListenerBridge alloc] initWithDelegate:this]);
|
|
|