|
|
Chromium Code Reviews|
Created:
8 years, 3 months ago by Pete Williamson Modified:
8 years, 3 months ago CC:
chromium-reviews, Raghu Simha, ncarter (slow), akalin, tim (not reviewing), markdavidscott, Mihai Parparita -not on Chrome Base URL:
http://git.chromium.org/chromium/src.git@master Visibility:
Public. |
DescriptionWe're building a new push messaging system to send messages to chrome apps which may or may not be running. If they are not running, we will start them and then deliver the message. However, that only works if Chrome is already running.
If any installed app has push messaging permission, then this change will background launch Chrome when we boot the OS so that Chrome is available to deliver the push messages, the same way we do today with background apps. Also, note that just like background apps, if the user exits Chrome intentionally that we don't keep it running
Andrew, please let me know if there is a better reviewer
BUG=144690
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=156215
Patch Set 1 #Patch Set 2 : revert accidental change #
Messages
Total messages: 15 (0 generated)
Changing the reviewer from Drew to Mihai, Drew is out on peternity leave. Mihai - if there is a better reviewer, please let me know who, and I'll change the review to them.
I'm not actually an OWNER in that directory. But, is there a reason why you want the pushMessaging permission to imply the background behavior? It seems more appropriate to still allow the background behavior to be controlled by the "background" permission. If I want my app to only receive push notifications while Chrome is running, I can leave off the "background" permission.
The reason we though this would be logical is because it seemed like packaged apps developers shouldn't have any notion of what it means for Chrome to be running. Does that mean the browser? The platform? It's counter-intuitive to receive push messages because the user is playing Angry Birds. We also assumed that at some point in time, with the new model, the old background permission would be up for deprecation, so we didn't want to wind up depending on it. Mark. On Wed, Aug 29, 2012 at 2:47 PM, <mihaip@chromium.org> wrote: > I'm not actually an OWNER in that directory. > > But, is there a reason why you want the pushMessaging permission to imply > the > background behavior? It seems more appropriate to still allow the > background > behavior to be controlled by the "background" permission. If I want my app > to > only receive push notifications while Chrome is running, I can leave off > the > "background" permission. > > https://chromiumcodereview.**appspot.com/10887032/<https://chromiumcodereview... >
The reason we though this would be logical is because it seemed like packaged apps developers shouldn't have any notion of what it means for Chrome to be running. Does that mean the browser? The platform? It's counter-intuitive to receive push messages because the user is playing Angry Birds. We also assumed that at some point in time, with the new model, the old background permission would be up for deprecation, so we didn't want to wind up depending on it. Mark. On Wed, Aug 29, 2012 at 2:47 PM, <mihaip@chromium.org> wrote: > I'm not actually an OWNER in that directory. > > But, is there a reason why you want the pushMessaging permission to imply > the > background behavior? It seems more appropriate to still allow the > background > behavior to be controlled by the "background" permission. If I want my app > to > only receive push notifications while Chrome is running, I can leave off > the > "background" permission. > > https://chromiumcodereview.**appspot.com/10887032/<https://chromiumcodereview... >
After thinking about this more, I think it makes sense to keep them separate permissions, since there are valid cases when I might not want background permission. On Aug 29, 2012 3:46 PM, "Mark Scott" <markdavidscott@google.com> wrote:
After thinking about this more, I think it makes sense to keep them separate permissions, since there are valid cases when I might not want background permission. On Aug 29, 2012 3:46 PM, "Mark Scott" <markdavidscott@google.com> wrote:
Changing the primary reviewer to rickcam@ who is in the OWNERS file
On 2012/08/29 21:47:17, Mihai Parparita wrote: > I'm not actually an OWNER in that directory. > > But, is there a reason why you want the pushMessaging permission to imply the > background behavior? It seems more appropriate to still allow the background > behavior to be controlled by the "background" permission. If I want my app to > only receive push notifications while Chrome is running, I can leave off the > "background" permission. This will create a error-prone condition - for push notifications to reliably work, the developer will have to specify that additional permission. If there is another app installed with 'background' permission or of the developer is working on a Mac where Chrome process never exists, he may never even discover that his clients do not receive notifications in some cases. Current 'background' permission is kinda bad because it gives developers a control of the lifespan of the Chrome browser process. Developers might not be aware what else happens when they specify this permission (and bad stuff does happen, like the session cookies won't reset). In general, users (and quite a lot of developers) do not really know when and why "the Chrome is running". They should not know that, this is our implementation detail. In the future, we are likely to split the monolithic Chrome browser process into more processes. For example, view processes for apps. As we do that, the permission that controls a lifespan of Chrome browser process will make no sense at all. As designed today, push messaging's prime use case is to reliably wake up a background page of the app. It can also be delivered to an already running application. Whether or not some Chrome processes are running for that, should not concern the user or developer. We should not have a special permission for running Chrome. This way, we keep flexibility to change implementation details as we see fit in the future. So I'd avoid mandating use of 'background' permission for push notifications to work correctly, and for now we should run Chrome process all the time if there are any apps registered for the push notifications. It is definitely a good idea to split a 'push listener' process form the rest of chrome, but it can take awhile.
OK, I agree that not tying pushMessaging to the background permission makes sense as far as future flexibility. LGTM. Note that rickcam@ left Google ~1 year ago and doesn't appear to have contributed to Chromium since then. Mihai On Tue, Sep 4, 2012 at 4:06 PM, <dimich@chromium.org> wrote: > On 2012/08/29 21:47:17, Mihai Parparita wrote: > >> I'm not actually an OWNER in that directory. >> > > But, is there a reason why you want the pushMessaging permission to imply >> the >> background behavior? It seems more appropriate to still allow the >> background >> behavior to be controlled by the "background" permission. If I want my >> app to >> only receive push notifications while Chrome is running, I can leave off >> the >> "background" permission. >> > > This will create a error-prone condition - for push notifications to > reliably > work, the developer will have to specify that additional permission. > If there is another app installed with 'background' permission or of the > developer is working on a Mac where Chrome process never exists, he may > never > even discover that his clients do not receive notifications in some cases. > > Current 'background' permission is kinda bad because it gives developers a > control of the lifespan of the Chrome browser process. Developers might > not be > aware what else happens when they specify this permission (and bad stuff > does > happen, like the session cookies won't reset). In general, users (and > quite a > lot of developers) do not really know when and why "the Chrome is > running". They > should not know that, this is our implementation detail. > > In the future, we are likely to split the monolithic Chrome browser > process into > more processes. For example, view processes for apps. As we do that, the > permission that controls a lifespan of Chrome browser process will make no > sense > at all. > > As designed today, push messaging's prime use case is to reliably wake up a > background page of the app. It can also be delivered to an already running > application. Whether or not some Chrome processes are running for that, > should > not concern the user or developer. We should not have a special permission > for > running Chrome. This way, we keep flexibility to change implementation > details > as we see fit in the future. > > So I'd avoid mandating use of 'background' permission for push > notifications to > work correctly, and for now we should run Chrome process all the time if > there > are any apps registered for the push notifications. It is definitely a > good > idea to split a 'push listener' process form the rest of chrome, but it > can take > awhile. > > > https://chromiumcodereview.**appspot.com/10887032/<https://chromiumcodereview... >
LGTM as well. I worked with Drew and Rick on this feature, although I'm not an OWNER either. Since the change is minimal, we probably should just land it manually.
With this going ahead, can the CL be linked to http://code.google.com/p/chromium/issues/detail?id=144690 and/or can the issue be closed once the change has landed? Thanks! Mark. On Tue, Sep 11, 2012 at 11:20 AM, <dimich@chromium.org> wrote: > LGTM as well. I worked with Drew and Rick on this feature, although I'm > not an > OWNER either. Since the change is minimal, we probably should just land it > manually. > > https://chromiumcodereview.**appspot.com/10887032/<https://chromiumcodereview... >
LGTM
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/petewil@chromium.org/10887032/2001
Change committed as 156215 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
