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

Side by Side Diff: android_webview/native/cookie_manager.cc

Issue 2237943002: Remove now-unnecessary .obj() in Java method calls. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@switch-context
Patch Set: Rebase *again* :( Created 4 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "android_webview/native/cookie_manager.h" 5 #include "android_webview/native/cookie_manager.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // into a base callback. 72 // into a base callback.
73 class BoolCookieCallbackHolder { 73 class BoolCookieCallbackHolder {
74 public: 74 public:
75 BoolCookieCallbackHolder(JNIEnv* env, jobject callback) { 75 BoolCookieCallbackHolder(JNIEnv* env, jobject callback) {
76 callback_.Reset(env, callback); 76 callback_.Reset(env, callback);
77 } 77 }
78 78
79 void Invoke(bool result) { 79 void Invoke(bool result) {
80 if (!callback_.is_null()) { 80 if (!callback_.is_null()) {
81 JNIEnv* env = base::android::AttachCurrentThread(); 81 JNIEnv* env = base::android::AttachCurrentThread();
82 Java_AwCookieManager_invokeBooleanCookieCallback(env, callback_.obj(), 82 Java_AwCookieManager_invokeBooleanCookieCallback(env, callback_, result);
83 result);
84 } 83 }
85 } 84 }
86 85
87 static BoolCallback ConvertToCallback( 86 static BoolCallback ConvertToCallback(
88 std::unique_ptr<BoolCookieCallbackHolder> me) { 87 std::unique_ptr<BoolCookieCallbackHolder> me) {
89 return base::Bind(&BoolCookieCallbackHolder::Invoke, 88 return base::Bind(&BoolCookieCallbackHolder::Invoke,
90 base::Owned(me.release())); 89 base::Owned(me.release()));
91 } 90 }
92 91
93 private: 92 private:
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 619
621 net::CookieStore* GetCookieStore() { 620 net::CookieStore* GetCookieStore() {
622 return CookieManager::GetInstance()->GetCookieStore(); 621 return CookieManager::GetInstance()->GetCookieStore();
623 } 622 }
624 623
625 bool RegisterCookieManager(JNIEnv* env) { 624 bool RegisterCookieManager(JNIEnv* env) {
626 return RegisterNativesImpl(env); 625 return RegisterNativesImpl(env);
627 } 626 }
628 627
629 } // android_webview namespace 628 } // android_webview namespace
OLDNEW
« no previous file with comments | « android_webview/native/aw_web_resource_response_impl.cc ('k') | android_webview/native/input_stream_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698