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

Unified Diff: components/safe_browsing_db/android/safe_browsing_api_handler_bridge.cc

Issue 2622773002: Componentize SafeBrowsingApi{Bridge,Handler} (Closed)
Patch Set: Addressing vakh@'s comments Created 3 years, 11 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 | « components/safe_browsing_db/android/safe_browsing_api_handler_bridge.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/safe_browsing_db/android/safe_browsing_api_handler_bridge.cc
diff --git a/chrome/browser/android/safe_browsing/safe_browsing_api_handler_bridge.cc b/components/safe_browsing_db/android/safe_browsing_api_handler_bridge.cc
similarity index 95%
rename from chrome/browser/android/safe_browsing/safe_browsing_api_handler_bridge.cc
rename to components/safe_browsing_db/android/safe_browsing_api_handler_bridge.cc
index 679521b0537c1228e2314e71b3dbf3076a336f2b..c51337ccc974b8bfe866390e71caf9294a38e73e 100644
--- a/chrome/browser/android/safe_browsing/safe_browsing_api_handler_bridge.cc
+++ b/components/safe_browsing_db/android/safe_browsing_api_handler_bridge.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/android/safe_browsing/safe_browsing_api_handler_bridge.h"
+#include "components/safe_browsing_db/android/safe_browsing_api_handler_bridge.h"
#include <memory>
#include <string>
@@ -12,7 +12,6 @@
#include "base/android/jni_array.h"
#include "base/android/jni_string.h"
#include "base/metrics/histogram_macros.h"
-#include "chrome/browser/safe_browsing/safe_browsing_util.h"
#include "components/safe_browsing_db/safe_browsing_api_handler_util.h"
#include "content/public/browser/browser_thread.h"
#include "jni/SafeBrowsingApiBridge_jni.h"
@@ -73,7 +72,6 @@ ScopedJavaLocalRef<jintArray> SBThreatTypesToJavaArray(
} // namespace
-
bool RegisterSafeBrowsingApiBridge(JNIEnv* env) {
return RegisterNativesImpl(env);
}
@@ -145,15 +143,14 @@ void OnUrlCheckDone(JNIEnv* env,
SafeBrowsingApiHandlerBridge::SafeBrowsingApiHandlerBridge()
: checked_api_support_(false) {}
-SafeBrowsingApiHandlerBridge::~SafeBrowsingApiHandlerBridge() {
-}
+SafeBrowsingApiHandlerBridge::~SafeBrowsingApiHandlerBridge() {}
bool SafeBrowsingApiHandlerBridge::CheckApiIsSupported() {
DCHECK_CURRENTLY_ON(BrowserThread::IO);
if (!checked_api_support_) {
DVLOG(1) << "Checking API support.";
- j_api_handler_ = Java_SafeBrowsingApiBridge_create(
- AttachCurrentThread(), GetApplicationContext());
+ j_api_handler_ = Java_SafeBrowsingApiBridge_create(AttachCurrentThread(),
+ GetApplicationContext());
checked_api_support_ = true;
}
return j_api_handler_.obj() != nullptr;
« no previous file with comments | « components/safe_browsing_db/android/safe_browsing_api_handler_bridge.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698