| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "base/android/jni_android.h" | 5 #include "base/android/jni_android.h" |
| 6 #include "base/android/jni_string.h" | 6 #include "base/android/jni_string.h" |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "chrome/browser/android/cookies/cookies_fetcher.h" | 10 #include "chrome/browser/android/cookies/cookies_fetcher.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 jobject_.Reset(); | 98 jobject_.Reset(); |
| 99 } | 99 } |
| 100 | 100 |
| 101 void CookiesFetcher::RestoreCookies(JNIEnv* env, | 101 void CookiesFetcher::RestoreCookies(JNIEnv* env, |
| 102 const JavaParamRef<jobject>& obj, | 102 const JavaParamRef<jobject>& obj, |
| 103 const JavaParamRef<jstring>& url, | 103 const JavaParamRef<jstring>& url, |
| 104 const JavaParamRef<jstring>& name, | 104 const JavaParamRef<jstring>& name, |
| 105 const JavaParamRef<jstring>& value, | 105 const JavaParamRef<jstring>& value, |
| 106 const JavaParamRef<jstring>& domain, | 106 const JavaParamRef<jstring>& domain, |
| 107 const JavaParamRef<jstring>& path, | 107 const JavaParamRef<jstring>& path, |
| 108 int64 creation, | 108 int64_t creation, |
| 109 int64 expiration, | 109 int64_t expiration, |
| 110 int64 last_access, | 110 int64_t last_access, |
| 111 bool secure, | 111 bool secure, |
| 112 bool httponly, | 112 bool httponly, |
| 113 bool firstpartyonly, | 113 bool firstpartyonly, |
| 114 int priority) { | 114 int priority) { |
| 115 Profile* profile = ProfileManager::GetPrimaryUserProfile(); | 115 Profile* profile = ProfileManager::GetPrimaryUserProfile(); |
| 116 if (!profile->HasOffTheRecordProfile()) { | 116 if (!profile->HasOffTheRecordProfile()) { |
| 117 return; // Don't create it. There is nothing to do. | 117 return; // Don't create it. There is nothing to do. |
| 118 } | 118 } |
| 119 profile = profile->GetOffTheRecordProfile(); | 119 profile = profile->GetOffTheRecordProfile(); |
| 120 | 120 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 | 173 |
| 174 // JNI functions | 174 // JNI functions |
| 175 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { | 175 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) { |
| 176 return reinterpret_cast<intptr_t>(new CookiesFetcher(env, obj, 0)); | 176 return reinterpret_cast<intptr_t>(new CookiesFetcher(env, obj, 0)); |
| 177 } | 177 } |
| 178 | 178 |
| 179 // Register native methods | 179 // Register native methods |
| 180 bool RegisterCookiesFetcher(JNIEnv* env) { | 180 bool RegisterCookiesFetcher(JNIEnv* env) { |
| 181 return RegisterNativesImpl(env); | 181 return RegisterNativesImpl(env); |
| 182 } | 182 } |
| OLD | NEW |