Summary: | Add ability to set custom userAgent for WebKit2 | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Sam Weinig <sam> | ||||
Component: | WebKit2 | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | ||||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | PC | ||||||
OS: | OS X 10.5 | ||||||
Attachments: |
|
Description
Sam Weinig
2010-08-18 16:29:37 PDT
Created attachment 64786 [details]
Patch
Comment on attachment 64786 [details] Patch +String WebPage::userAgent() > +{ > + if (!m_customUserAgent.isNull()) > + return m_customUserAgent; > + > + // FIXME: This should be based on an application name. > + return "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6; en-us) AppleWebKit/531.4 (KHTML, like Gecko) Version/4.0.3 Safari/531.4"; Extra space after return. > @@ -92,6 +92,7 @@ public: > // -- Called from WebCore clients. > bool handleEditingKeyboardEvent(WebCore::KeyboardEvent*); > void show(); > + String userAgent(); Looks like this could be const. r=me |