Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(224)

Side by Side Diff: chrome/browser/services/gcm/push_messaging_service_impl.h

Issue 770023002: Push registration should read a "gcm_user_visible_only" key from the Manifest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment fix Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ 5 #ifndef CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_
6 #define CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ 6 #define CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "components/gcm_driver/gcm_app_handler.h" 10 #include "components/gcm_driver/gcm_app_handler.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 const GCMClient::SendErrorDetails& send_error_details) override; 47 const GCMClient::SendErrorDetails& send_error_details) override;
48 void OnSendAcknowledged(const std::string& app_id, 48 void OnSendAcknowledged(const std::string& app_id,
49 const std::string& message_id) override; 49 const std::string& message_id) override;
50 bool CanHandle(const std::string& app_id) const override; 50 bool CanHandle(const std::string& app_id) const override;
51 51
52 // content::PushMessagingService implementation: 52 // content::PushMessagingService implementation:
53 void Register( 53 void Register(
54 const GURL& origin, 54 const GURL& origin,
55 int64 service_worker_registration_id, 55 int64 service_worker_registration_id,
56 const std::string& sender_id, 56 const std::string& sender_id,
57 bool user_visible_only,
57 int renderer_id, 58 int renderer_id,
58 int render_frame_id, 59 int render_frame_id,
59 bool user_gesture, 60 bool user_gesture,
60 const content::PushMessagingService::RegisterCallback& callback) override; 61 const content::PushMessagingService::RegisterCallback& callback) override;
61 blink::WebPushPermissionStatus GetPermissionStatus( 62 blink::WebPushPermissionStatus GetPermissionStatus(
Miguel Garcia 2014/12/03 14:02:51 I think we need user_visible_only here as well so
Peter Beverloo 2014/12/03 15:01:59 Added a TODO in PushMessagingMessageFilter::OnRegi
62 const GURL& requesting_origin, 63 const GURL& requesting_origin,
63 int renderer_id, 64 int renderer_id,
64 int render_frame_id) override; 65 int render_frame_id) override;
65 66
66 void SetProfileForTesting(Profile* profile); 67 void SetProfileForTesting(Profile* profile);
67 68
68 private: 69 private:
69 void IncreasePushRegistrationCount(int add); 70 void IncreasePushRegistrationCount(int add);
70 void DecreasePushRegistrationCount(int subtract); 71 void DecreasePushRegistrationCount(int subtract);
71 72
(...skipping 24 matching lines...) Expand all
96 int push_registration_count_; 97 int push_registration_count_;
97 98
98 base::WeakPtrFactory<PushMessagingServiceImpl> weak_factory_; 99 base::WeakPtrFactory<PushMessagingServiceImpl> weak_factory_;
99 100
100 DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceImpl); 101 DISALLOW_COPY_AND_ASSIGN(PushMessagingServiceImpl);
101 }; 102 };
102 103
103 } // namespace gcm 104 } // namespace gcm
104 105
105 #endif // CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_ 106 #endif // CHROME_BROWSER_SERVICES_GCM_PUSH_MESSAGING_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698