 Chromium Code Reviews
 Chromium Code Reviews Issue 1701313002:
  Partial implementation of subscription restrictions.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1701313002:
  Partial implementation of subscription restrictions.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| Index: content/public/common/content_push_subscription_options.h | 
| diff --git a/content/public/common/content_push_subscription_options.h b/content/public/common/content_push_subscription_options.h | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..95e53f2aa4d208db41a96a4c0364d1ce7eae1bb9 | 
| --- /dev/null | 
| +++ b/content/public/common/content_push_subscription_options.h | 
| @@ -0,0 +1,36 @@ | 
| +// Copyright 2016 The Chromium Authors. All rights reserved. | 
| +// Use of this source code is governed by a BSD-style license that can be | 
| +// found in the LICENSE file. | 
| + | 
| +#ifndef CONTENT_PUBLIC_COMMON_CONTENT_PUSH_SUBSCRIPTION_OPTIONS_H_ | 
| +#define CONTENT_PUBLIC_COMMON_CONTENT_PUSH_SUBSCRIPTION_OPTIONS_H_ | 
| + | 
| +#include <string> | 
| + | 
| +#include "content/common/content_export.h" | 
| + | 
| +namespace content { | 
| + | 
| +// Structure to hold the options provided from the web app developer as | 
| +// part of asking for a new push subscription. | 
| +struct CONTENT_EXPORT ContentPushSubscriptionOptions { | 
| 
Peter Beverloo
2016/02/17 16:15:35
nit: no need to prefix with "Content", it's namesp
 
harkness
2016/02/18 10:45:14
Done.
 | 
| + ContentPushSubscriptionOptions() {} | 
| + ~ContentPushSubscriptionOptions() {} | 
| + | 
| + // Whether or not the app developer agrees to provide user visible | 
| + // notifications whenever they receive a push message. | 
| + bool user_visible_only; | 
| 
Peter Beverloo
2016/02/17 16:15:35
Please make sure that we assign default values to
 
harkness
2016/02/18 10:45:15
Done.
 | 
| + | 
| + // Whether the protocol for communicating with the GCM is using | 
| + // an ID for the app service or is using the app service's public key. | 
| + bool using_public_key; | 
| 
Peter Beverloo
2016/02/17 16:15:35
Why is it significant for the browser process to k
 
harkness
2016/02/18 10:45:14
I was thinking that we would do verification also
 
Peter Beverloo
2016/02/18 11:39:43
Yes, but why is this flag significant for that? Th
 | 
| + | 
| + // The unique identifier of the application service which is used to | 
| + // verify the push message before delivery. This could either be an ID | 
| + // assigned by the developer console or the app server's public key. | 
| + std::string sender_info; | 
| +}; | 
| + | 
| +} // namespace content | 
| + | 
| +#endif // CONTENT_PUBLIC_COMMON_CONTENT_PUSH_SUBSCRIPTION_OPTIONS_H_ |