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

Side by Side Diff: chrome/browser/android/cookies/cookies_fetcher.cc

Issue 1312153003: jni_generator: Pass object parameters as JavaParamRef. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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 unified diff | Download patch
OLDNEW
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/time/time.h" 8 #include "base/time/time.h"
9 #include "chrome/browser/android/cookies/cookies_fetcher.h" 9 #include "chrome/browser/android/cookies/cookies_fetcher.h"
10 #include "chrome/browser/profiles/profile_manager.h" 10 #include "chrome/browser/profiles/profile_manager.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 net::CookieMonster* monster = store->GetCookieMonster(); 154 net::CookieMonster* monster = store->GetCookieMonster();
155 base::Callback<void(bool success)> cb; 155 base::Callback<void(bool success)> cb;
156 156
157 monster->SetCookieWithDetailsAsync( 157 monster->SetCookieWithDetailsAsync(
158 cookie.Source(), cookie.Name(), cookie.Value(), cookie.Domain(), 158 cookie.Source(), cookie.Name(), cookie.Value(), cookie.Domain(),
159 cookie.Path(), cookie.ExpiryDate(), cookie.IsSecure(), 159 cookie.Path(), cookie.ExpiryDate(), cookie.IsSecure(),
160 cookie.IsHttpOnly(), cookie.IsFirstPartyOnly(), cookie.Priority(), cb); 160 cookie.IsHttpOnly(), cookie.IsFirstPartyOnly(), cookie.Priority(), cb);
161 } 161 }
162 162
163 // JNI functions 163 // JNI functions
164 static jlong Init(JNIEnv* env, jobject obj) { 164 static jlong Init(JNIEnv* env, const JavaParamRef<jobject>& obj) {
165 return reinterpret_cast<intptr_t>(new CookiesFetcher(env, obj, 0)); 165 return reinterpret_cast<intptr_t>(new CookiesFetcher(env, obj, 0));
166 } 166 }
167 167
168 // Register native methods 168 // Register native methods
169 bool RegisterCookiesFetcher(JNIEnv* env) { 169 bool RegisterCookiesFetcher(JNIEnv* env) {
170 return RegisterNativesImpl(env); 170 return RegisterNativesImpl(env);
171 } 171 }
OLDNEW
« no previous file with comments | « chrome/browser/android/contextualsearch/contextual_search_tab_helper.cc ('k') | chrome/browser/android/dev_tools_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698