OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/android/safe_browsing/safe_browsing_api_handler_bridge.
h" | 5 #include "chrome/browser/android/safe_browsing/safe_browsing_api_handler_bridge.
h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/android/context_utils.h" | 10 #include "base/android/context_utils.h" |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 if (local_threat_types.empty()) { | 185 if (local_threat_types.empty()) { |
186 local_threat_types.push_back(SB_THREAT_TYPE_URL_PHISHING); | 186 local_threat_types.push_back(SB_THREAT_TYPE_URL_PHISHING); |
187 local_threat_types.push_back(SB_THREAT_TYPE_URL_MALWARE); | 187 local_threat_types.push_back(SB_THREAT_TYPE_URL_MALWARE); |
188 } | 188 } |
189 | 189 |
190 JNIEnv* env = AttachCurrentThread(); | 190 JNIEnv* env = AttachCurrentThread(); |
191 ScopedJavaLocalRef<jstring> j_url = ConvertUTF8ToJavaString(env, url.spec()); | 191 ScopedJavaLocalRef<jstring> j_url = ConvertUTF8ToJavaString(env, url.spec()); |
192 ScopedJavaLocalRef<jintArray> j_threat_types = | 192 ScopedJavaLocalRef<jintArray> j_threat_types = |
193 SBThreatTypesToJavaArray(env, local_threat_types); | 193 SBThreatTypesToJavaArray(env, local_threat_types); |
194 | 194 |
195 Java_SafeBrowsingApiBridge_startUriLookup(env, j_api_handler_.obj(), | 195 Java_SafeBrowsingApiBridge_startUriLookup(env, j_api_handler_, callback_id, |
196 callback_id, j_url.obj(), | 196 j_url, j_threat_types); |
197 j_threat_types.obj()); | |
198 } | 197 } |
199 | 198 |
200 } // namespace safe_browsing | 199 } // namespace safe_browsing |
OLD | NEW |