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

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

Issue 2578583002: Provide a mechanism for the GCM driver to send message receipts to GCM.
Patch Set: Adding new file I missed previously. Created 3 years, 11 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"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "components/gcm_driver/gcm_driver.h" 14 #include "components/gcm_driver/gcm_driver.h"
15 #include "components/gcm_driver/gcm_message_status.h"
15 #include "components/gcm_driver/gcm_stats_recorder_android.h" 16 #include "components/gcm_driver/gcm_stats_recorder_android.h"
16 17
17 namespace base { 18 namespace base {
18 class FilePath; 19 class FilePath;
19 class SequencedTaskRunner; 20 class SequencedTaskRunner;
20 } 21 }
21 22
22 namespace gcm { 23 namespace gcm {
23 24
24 // GCMDriver implementation for Android, using Android GCM APIs. 25 // GCMDriver implementation for Android, using Android GCM APIs.
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 void UnregisterWithSenderIdImpl(const std::string& app_id, 91 void UnregisterWithSenderIdImpl(const std::string& app_id,
91 const std::string& sender_id) override; 92 const std::string& sender_id) override;
92 void SendImpl(const std::string& app_id, 93 void SendImpl(const std::string& app_id,
93 const std::string& receiver_id, 94 const std::string& receiver_id,
94 const OutgoingMessage& message) override; 95 const OutgoingMessage& message) override;
95 void RecordDecryptionFailure(const std::string& app_id, 96 void RecordDecryptionFailure(const std::string& app_id,
96 GCMEncryptionProvider::DecryptionResult result) 97 GCMEncryptionProvider::DecryptionResult result)
97 override; 98 override;
98 99
99 private: 100 private:
101 void SendMessageReceipt(const std::string& app_id,
102 const std::string& message_id,
103 GCMMessageStatus status);
104
100 base::android::ScopedJavaGlobalRef<jobject> java_ref_; 105 base::android::ScopedJavaGlobalRef<jobject> java_ref_;
101 106
102 // Callback for GetGCMStatistics. 107 // Callback for GetGCMStatistics.
103 GetGCMStatisticsCallback get_gcm_statistics_callback_; 108 GetGCMStatisticsCallback get_gcm_statistics_callback_;
104 109
105 // Recorder that logs GCM activities. 110 // Recorder that logs GCM activities.
106 GCMStatsRecorderAndroid recorder_; 111 GCMStatsRecorderAndroid recorder_;
107 112
108 DISALLOW_COPY_AND_ASSIGN(GCMDriverAndroid); 113 DISALLOW_COPY_AND_ASSIGN(GCMDriverAndroid);
109 }; 114 };
110 115
111 } // namespace gcm 116 } // namespace gcm
112 117
113 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H 118 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698