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

Unified Diff: chrome/browser/profiles/profile_android.cc

Issue 556083004: Add hooks to get incognito profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/profiles/profile_android.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_android.cc
diff --git a/chrome/browser/profiles/profile_android.cc b/chrome/browser/profiles/profile_android.cc
index 0496675c2e0219ca1465a71a5121f4425a370b82..ce6ec36402687357bedf7eb478f2ec567f66997c 100644
--- a/chrome/browser/profiles/profile_android.cc
+++ b/chrome/browser/profiles/profile_android.cc
@@ -63,6 +63,30 @@ jobject ProfileAndroid::GetLastUsedProfile(JNIEnv* env, jclass clazz) {
return profile_android->obj_.obj();
}
+base::android::ScopedJavaLocalRef<jobject> ProfileAndroid::GetOriginalProfile(
+ JNIEnv* env, jobject obj) {
+ ProfileAndroid* original_profile = ProfileAndroid::FromProfile(
+ profile_->GetOriginalProfile());
+ DCHECK(original_profile);
+ return original_profile->GetJavaObject();
+}
+
+base::android::ScopedJavaLocalRef<jobject>
+ProfileAndroid::GetOffTheRecordProfile(JNIEnv* env, jobject obj) {
+ ProfileAndroid* otr_profile = ProfileAndroid::FromProfile(
+ profile_->GetOffTheRecordProfile());
+ DCHECK(otr_profile);
+ return otr_profile->GetJavaObject();
+}
+
+jboolean ProfileAndroid::HasOffTheRecordProfile(JNIEnv* env, jobject obj) {
+ return profile_->HasOffTheRecordProfile();
+}
+
+jboolean ProfileAndroid::IsOffTheRecord(JNIEnv* env, jobject obj) {
+ return profile_->IsOffTheRecord();
+}
+
// static
jobject GetLastUsedProfile(JNIEnv* env, jclass clazz) {
return ProfileAndroid::GetLastUsedProfile(env, clazz);
@@ -74,7 +98,6 @@ ProfileAndroid::ProfileAndroid(Profile* profile)
base::android::ScopedJavaLocalRef<jobject> jprofile =
Java_Profile_create(env, reinterpret_cast<intptr_t>(this));
obj_.Reset(env, jprofile.obj());
-
}
ProfileAndroid::~ProfileAndroid() {
« no previous file with comments | « chrome/browser/profiles/profile_android.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698