Bug 134521

Summary: iOS should use shared code to determine the system marketing version
Product: WebKit Reporter: Mark Rowe (bdash) <mrowe>
Component: WebCore Misc.Assignee: Mark Rowe (bdash) <mrowe>
Status: RESOLVED FIXED    
Severity: Normal CC: bunhere, cdumez, commit-queue, gyuyoung.kim, sergio
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 134524    
Attachments:
Description Flags
Patch none

Description Mark Rowe (bdash) 2014-07-01 16:20:24 PDT
The iOS implementation of systemMarketingVersion is currently a FIXME. UserAgentIOS.mm has an implementation under the name osMarketingVersion that's virtually identical to the OS X version. We should only have a single copy of the code.
Comment 1 Mark Rowe (bdash) 2014-07-01 16:27:12 PDT
Created attachment 234214 [details]
Patch
Comment 2 Simon Fraser (smfr) 2014-07-02 14:46:44 PDT
Comment on attachment 234214 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=234214&action=review

> Source/WebCore/page/cocoa/UserAgent.mm:38
> +    return [systemMarketingVersion() stringByReplacingOccurrencesOfString:@"." withString:@"_"];

It's sad that we go from String to NSString* and back here.
Comment 3 WebKit Commit Bot 2014-07-02 15:39:05 PDT
Comment on attachment 234214 [details]
Patch

Clearing flags on attachment: 234214

Committed r170730: <http://trac.webkit.org/changeset/170730>
Comment 4 WebKit Commit Bot 2014-07-02 15:39:10 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Darin Adler 2014-07-03 09:54:43 PDT
Comment on attachment 234214 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=234214&action=review

>> Source/WebCore/page/cocoa/UserAgent.mm:38
>> +    return [systemMarketingVersion() stringByReplacingOccurrencesOfString:@"." withString:@"_"];
> 
> It's sad that we go from String to NSString* and back here.

WTF::String dose have a function to do this.

    return systemMarketingVersion.replace('.', '_');