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

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

Issue 2697793004: Push API: Validate storage before returning cached subscriptions (Closed)
Patch Set: Fix include Created 3 years, 8 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
« no previous file with comments | « components/gcm_driver/gcm_driver.cc ('k') | components/gcm_driver/gcm_driver_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/bind.h"
11 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
12 #include "base/macros.h" 13 #include "base/macros.h"
13 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
14 #include "components/gcm_driver/gcm_driver.h" 15 #include "components/gcm_driver/gcm_driver.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 }
(...skipping 26 matching lines...) Expand all
47 const base::android::JavaParamRef<jstring>& app_id, 48 const base::android::JavaParamRef<jstring>& app_id,
48 const base::android::JavaParamRef<jstring>& sender_id, 49 const base::android::JavaParamRef<jstring>& sender_id,
49 const base::android::JavaParamRef<jstring>& collapse_key, 50 const base::android::JavaParamRef<jstring>& collapse_key,
50 const base::android::JavaParamRef<jbyteArray>& raw_data, 51 const base::android::JavaParamRef<jbyteArray>& raw_data,
51 const base::android::JavaParamRef<jobjectArray>& data_keys_and_values); 52 const base::android::JavaParamRef<jobjectArray>& data_keys_and_values);
52 53
53 // Register JNI methods. 54 // Register JNI methods.
54 static bool RegisterJni(JNIEnv* env); 55 static bool RegisterJni(JNIEnv* env);
55 56
56 // GCMDriver implementation: 57 // GCMDriver implementation:
58 void ValidateRegistration(
59 const std::string& app_id,
60 const std::vector<std::string>& sender_ids,
61 const std::string& registration_id,
62 const ValidateRegistrationCallback& callback) override;
57 void OnSignedIn() override; 63 void OnSignedIn() override;
58 void OnSignedOut() override; 64 void OnSignedOut() override;
59 void Enable() override; 65 void Enable() override;
60 void AddConnectionObserver(GCMConnectionObserver* observer) override; 66 void AddConnectionObserver(GCMConnectionObserver* observer) override;
61 void RemoveConnectionObserver(GCMConnectionObserver* observer) override; 67 void RemoveConnectionObserver(GCMConnectionObserver* observer) override;
62 void Disable() override; 68 void Disable() override;
63 GCMClient* GetGCMClientForTesting() const override; 69 GCMClient* GetGCMClientForTesting() const override;
64 bool IsStarted() const override; 70 bool IsStarted() const override;
65 bool IsConnected() const override; 71 bool IsConnected() const override;
66 void GetGCMStatistics(const GetGCMStatisticsCallback& callback, 72 void GetGCMStatistics(const GetGCMStatisticsCallback& callback,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 110
105 // Recorder that logs GCM activities. 111 // Recorder that logs GCM activities.
106 GCMStatsRecorderAndroid recorder_; 112 GCMStatsRecorderAndroid recorder_;
107 113
108 DISALLOW_COPY_AND_ASSIGN(GCMDriverAndroid); 114 DISALLOW_COPY_AND_ASSIGN(GCMDriverAndroid);
109 }; 115 };
110 116
111 } // namespace gcm 117 } // namespace gcm
112 118
113 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H 119 #endif // COMPONENTS_GCM_DRIVER_GCM_DRIVER_ANDROID_H
OLDNEW
« no previous file with comments | « components/gcm_driver/gcm_driver.cc ('k') | components/gcm_driver/gcm_driver_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698