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

Side by Side Diff: chrome/browser/profiles/profile_android.cc

Issue 67573003: Android: moves chrome/ to use long for JNI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/profiles/profile_android.h" 5 #include "chrome/browser/profiles/profile_android.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/profiles/profile_manager.h" 9 #include "chrome/browser/profiles/profile_manager.h"
10 #include "jni/Profile_jni.h" 10 #include "jni/Profile_jni.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 65
66 // static 66 // static
67 jobject GetLastUsedProfile(JNIEnv* env, jclass clazz) { 67 jobject GetLastUsedProfile(JNIEnv* env, jclass clazz) {
68 return ProfileAndroid::GetLastUsedProfile(env, clazz); 68 return ProfileAndroid::GetLastUsedProfile(env, clazz);
69 } 69 }
70 70
71 ProfileAndroid::ProfileAndroid(Profile* profile) 71 ProfileAndroid::ProfileAndroid(Profile* profile)
72 : profile_(profile) { 72 : profile_(profile) {
73 JNIEnv* env = AttachCurrentThread(); 73 JNIEnv* env = AttachCurrentThread();
74 base::android::ScopedJavaLocalRef<jobject> jprofile = 74 base::android::ScopedJavaLocalRef<jobject> jprofile =
75 Java_Profile_create(env, reinterpret_cast<int>(this)); 75 Java_Profile_create(env, reinterpret_cast<intptr_t>(this));
76 obj_.Reset(env, jprofile.obj()); 76 obj_.Reset(env, jprofile.obj());
77 77
78 } 78 }
79 79
80 ProfileAndroid::~ProfileAndroid() { 80 ProfileAndroid::~ProfileAndroid() {
81 Java_Profile_destroy(AttachCurrentThread(), obj_.obj()); 81 Java_Profile_destroy(AttachCurrentThread(), obj_.obj());
82 } 82 }
83 83
84 base::android::ScopedJavaLocalRef<jobject> ProfileAndroid::GetJavaObject() { 84 base::android::ScopedJavaLocalRef<jobject> ProfileAndroid::GetJavaObject() {
85 return base::android::ScopedJavaLocalRef<jobject>(obj_); 85 return base::android::ScopedJavaLocalRef<jobject>(obj_);
86 } 86 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698