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

Side by Side Diff: components/gcm_driver/gcm_driver_android.h

Issue 914693002: Push API: Fix unsubscribing from GCM on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Now compiles and passes tests (and uses CHECK_EQ) Created 5 years, 10 months 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 COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H 5 #ifndef COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H
6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H 6 #define COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H
7 7
8 #include <jni.h> 8 #include <jni.h>
9 9
10 #include "base/android/scoped_java_ref.h" 10 #include "base/android/scoped_java_ref.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 void RemoveAccountMapping(const std::string& account_id) override; 63 void RemoveAccountMapping(const std::string& account_id) override;
64 base::Time GetLastTokenFetchTime() override; 64 base::Time GetLastTokenFetchTime() override;
65 void SetLastTokenFetchTime(const base::Time& time) override; 65 void SetLastTokenFetchTime(const base::Time& time) override;
66 void WakeFromSuspendForHeartbeat(bool wake) override; 66 void WakeFromSuspendForHeartbeat(bool wake) override;
67 67
68 protected: 68 protected:
69 // GCMDriver implementation: 69 // GCMDriver implementation:
70 GCMClient::Result EnsureStarted(GCMClient::StartMode start_mode) override; 70 GCMClient::Result EnsureStarted(GCMClient::StartMode start_mode) override;
71 void RegisterImpl(const std::string& app_id, 71 void RegisterImpl(const std::string& app_id,
72 const std::vector<std::string>& sender_ids) override; 72 const std::vector<std::string>& sender_ids) override;
73 void UnregisterImpl(const std::string& app_id) override; 73 void UnregisterImpl(const std::string& app_id,
74 const std::vector<std::string>& sender_ids) override;
74 void SendImpl(const std::string& app_id, 75 void SendImpl(const std::string& app_id,
75 const std::string& receiver_id, 76 const std::string& receiver_id,
76 const GCMClient::OutgoingMessage& message) override; 77 const GCMClient::OutgoingMessage& message) override;
77 78
78 private: 79 private:
79 base::android::ScopedJavaGlobalRef<jobject> java_ref_; 80 base::android::ScopedJavaGlobalRef<jobject> java_ref_;
80 81
81 DISALLOW_COPY_AND_ASSIGN(GCMDriverAndroid); 82 DISALLOW_COPY_AND_ASSIGN(GCMDriverAndroid);
82 }; 83 };
83 84
84 } // namespace gcm 85 } // namespace gcm
85 86
86 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H 87 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698