Bug 134521 - iOS should use shared code to determine the system marketing version
Summary: iOS should use shared code to determine the system marketing version
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Rowe (bdash)
URL:
Keywords:
Depends on:
Blocks: 134524
  Show dependency treegraph
 
Reported: 2014-07-01 16:20 PDT by Mark Rowe (bdash)
Modified: 2014-07-03 09:54 PDT (History)
5 users (show)

See Also:


Attachments
Patch (37.52 KB, patch)
2014-07-01 16:27 PDT, Mark Rowe (bdash)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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('.', '_');