<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:andersca@apple.com" title="Anders Carlsson <andersca@apple.com>"> <span class="fn">Anders Carlsson</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - We should also store the time information for recent searches"
href="https://bugs.webkit.org/show_bug.cgi?id=148388">bug 148388</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Attachment #261233 Flags</td>
<td>review?
</td>
<td>review-
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - We should also store the time information for recent searches"
href="https://bugs.webkit.org/show_bug.cgi?id=148388#c15">Comment # 15</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - We should also store the time information for recent searches"
href="https://bugs.webkit.org/show_bug.cgi?id=148388">bug 148388</a>
from <span class="vcard"><a class="email" href="mailto:andersca@apple.com" title="Anders Carlsson <andersca@apple.com>"> <span class="fn">Anders Carlsson</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=261233&action=diff" name="attach_261233" title="Patch v2">attachment 261233</a> <a href="attachment.cgi?id=261233&action=edit" title="Patch v2">[details]</a></span>
Patch v2
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=261233&action=review">https://bugs.webkit.org/attachment.cgi?id=261233&action=review</a>
I think you should use std::chrono::system_clock::time_point for times instead of double - then you can use std::chrono::system_clock::now() to create a time.
You can convert between time_points and NSDates using
NSTimeInterval timeInterval = std::chrono::duration_cast<std::chrono::duration<double>>(modifiedSince.time_since_epoch()).count();
NSDate *date = [NSDate dateWithTimeIntervalSince1970:timeInterval];
Does older versions of WebKit deal with the updated user defaults format?
<span class="quote">> Source/WebCore/platform/win/SearchPopupMenuWin.cpp:96
> + if (CFGetTypeID(item) == CFArrayGetTypeID() && CFArrayGetCount((CFArrayRef)item) == 2) {</span >
Can use dynamic_cf_cast here.
<span class="quote">> Source/WebKit/mac/WebCoreSupport/SearchPopupMenuMac.mm:64
> + [items addObject:[NSArray arrayWithObjects:searchItem.first, [[NSNumber alloc] initWithDouble:searchItem.second], nil]];</span >
I think you should use NSDate for the times instead.
<span class="quote">> Source/WebKit/mac/WebCoreSupport/SearchPopupMenuMac.mm:77
> + if ([item isKindOfClass:[NSArray class]] && ((NSArray*)item).count == 2)
> + searchItems.append(std::make_pair((String)item[0], ((NSNumber*)item[1]).doubleValue));</span >
You can use dynamic_objc_cast here.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>