RESOLVED FIXED 34238
Send application ID and full URL to Chromium when requesting notification permissions
https://bugs.webkit.org/show_bug.cgi?id=34238
Summary Send application ID and full URL to Chromium when requesting notification per...
Aaron Boodman
Reported 2010-01-27 19:42:16 PST
Send application ID and full URL to Chromium when requesting notification permissions
Attachments
Patch (15.30 KB, patch)
2010-01-27 20:27 PST, Aaron Boodman
darin: review+
Aaron Boodman
Comment 1 2010-01-27 20:10:37 PST
We are experimenting with the concept of an "application id" in Chromium to group permission requests together so that they can be made all at once. The application ID should be settable by authors using either an HTTP header or a meta tag using http-equiv.
Aaron Boodman
Comment 2 2010-01-27 20:27:14 PST
WebKit Review Bot
Comment 3 2010-01-27 20:29:49 PST
Attachment 47588 [details] did not pass style-queue: Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 WebCore/notifications/NotificationPresenter.h:41: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 1 If any of these errors are false positives, please file a bug against check-webkit-style.
Aaron Boodman
Comment 4 2010-01-27 20:34:09 PST
(In reply to comment #3) > Attachment 47588 [details] did not pass style-queue: > > Failed to run "WebKitTools/Scripts/check-webkit-style" exit_code: 1 > WebCore/notifications/NotificationPresenter.h:41: Code inside a namespace > should not be indented. [whitespace/indent] [4] > Total errors found: 1 > > > If any of these errors are false positives, please file a bug against > check-webkit-style. Note: the file was already indented incorrectly, so just followed along.
Darin Adler
Comment 5 2010-01-27 20:44:03 PST
Comment on attachment 47588 [details] Patch > - if (m_presenter->checkPermission(context->securityOrigin()) != NotificationPresenter::PermissionAllowed) { > + if (m_presenter->checkPermission(context->url(), > + context->isDocument() ? static_cast<Document*>(context) : 0) > + != NotificationPresenter::PermissionAllowed) { I'm surprised to discover that the style guide doesn't specifically recommends against lining up with parentheses in this fashion. Renaming will make lines like this no longer line up, so we have been avoiding this kind of formatting, but I can't find that in writing anywhere. Maybe a local variable for the document will keep things a bit more compact. > virtual void cancel(Notification* object) = 0; > virtual void notificationObjectDestroyed(Notification* object) = 0; > virtual void requestPermission(SecurityOrigin* origin, PassRefPtr<VoidCallback> callback) = 0; > + virtual Permission checkPermission(const KURL& url, Document* document) = 0; In every single one of these cases the argument names should be omitted, because all they do is repeat the type name. I didn't review style much in the Chromium-specific part of the patch, but the code seems OK. r=me
Aaron Boodman
Comment 6 2010-01-28 11:24:31 PST
Eric Seidel (no email)
Comment 7 2010-01-28 12:12:03 PST
Broke Chromium builders: CXX(target) out/Release/obj.target/webcore/../../WebCore/bindings/v8/WorkerContextExecutionProxy.o CXX(target) out/Release/obj.target/webcore/../../WebCore/notifications/Notification.o ../../WebCore/notifications/Notification.cpp: In constructor ‘WebCore::Notification::Notification(const WebCore::String&, WebCore::ScriptExecutionContext*, WebCore::ExceptionCode&, WebCore::NotificationPresenter*)’: ../../WebCore/notifications/Notification.cpp:53: error: expected primary-expression before ‘!=’ token ../../WebCore/notifications/Notification.cpp:53: error: expected `;' before ‘)’ token ../../WebCore/notifications/Notification.cpp: In constructor ‘WebCore::Notification::Notification(const WebCore::NotificationContents&, WebCore::ScriptExecutionContext*, WebCore::ExceptionCode&, WebCore::NotificationPresenter*)’: ../../WebCore/notifications/Notification.cpp:74: error: expected primary-expression before ‘!=’ token ../../WebCore/notifications/Notification.cpp:74: error: expected `;' before ‘)’ token make[1]: *** [out/Release/obj.target/webcore/../../WebCore/notifications/Notification.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory `/WebKit-BuildSlave/chromium-linux-release/build/WebKit/chromium' program finished with exit code 2 elapsedTime=57.465181
Note You need to log in before you can comment on or make changes to this bug.