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

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

Issue 1231613005: Hook up the Push API with GCM's new ability to own encryption keys. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gcm-encryption
Patch Set: Created 5 years, 4 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_android.h ('k') | components/gcm_driver/gcm_driver_desktop.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 #include "components/gcm_driver/gcm_driver_android.h" 5 #include "components/gcm_driver/gcm_driver_android.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/android/jni_android.h" 9 #include "base/android/jni_android.h"
10 #include "base/android/jni_array.h" 10 #include "base/android/jni_array.h"
11 #include "base/android/jni_string.h" 11 #include "base/android/jni_string.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "jni/GCMDriver_jni.h" 14 #include "jni/GCMDriver_jni.h"
15 15
16 using base::android::AppendJavaStringArrayToStringVector; 16 using base::android::AppendJavaStringArrayToStringVector;
17 using base::android::AttachCurrentThread; 17 using base::android::AttachCurrentThread;
18 using base::android::ConvertJavaStringToUTF8; 18 using base::android::ConvertJavaStringToUTF8;
19 using base::android::ConvertUTF8ToJavaString; 19 using base::android::ConvertUTF8ToJavaString;
20 using base::android::JavaByteArrayToByteVector; 20 using base::android::JavaByteArrayToByteVector;
21 21
22 namespace gcm { 22 namespace gcm {
23 23
24 GCMDriverAndroid::GCMDriverAndroid() { 24 GCMDriverAndroid::GCMDriverAndroid(
25 const base::FilePath& store_path,
26 const scoped_refptr<base::SequencedTaskRunner>& blocking_task_runner)
27 : GCMDriver(store_path, blocking_task_runner) {
25 JNIEnv* env = AttachCurrentThread(); 28 JNIEnv* env = AttachCurrentThread();
26 java_ref_.Reset( 29 java_ref_.Reset(
27 Java_GCMDriver_create(env, 30 Java_GCMDriver_create(env,
28 reinterpret_cast<intptr_t>(this), 31 reinterpret_cast<intptr_t>(this),
29 base::android::GetApplicationContext())); 32 base::android::GetApplicationContext()));
30 } 33 }
31 34
32 GCMDriverAndroid::~GCMDriverAndroid() { 35 GCMDriverAndroid::~GCMDriverAndroid() {
33 JNIEnv* env = AttachCurrentThread(); 36 JNIEnv* env = AttachCurrentThread();
34 Java_GCMDriver_destroy(env, java_ref_.obj()); 37 Java_GCMDriver_destroy(env, java_ref_.obj());
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 ConvertUTF8ToJavaString(env, sender_id).Release()); 215 ConvertUTF8ToJavaString(env, sender_id).Release());
213 } 216 }
214 217
215 void GCMDriverAndroid::SendImpl(const std::string& app_id, 218 void GCMDriverAndroid::SendImpl(const std::string& app_id,
216 const std::string& receiver_id, 219 const std::string& receiver_id,
217 const OutgoingMessage& message) { 220 const OutgoingMessage& message) {
218 NOTIMPLEMENTED(); 221 NOTIMPLEMENTED();
219 } 222 }
220 223
221 } // namespace gcm 224 } // namespace gcm
OLDNEW
« no previous file with comments | « components/gcm_driver/gcm_driver_android.h ('k') | components/gcm_driver/gcm_driver_desktop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698