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

Unified Diff: chrome/browser/android/data_usage/external_data_use_observer_bridge.cc

Issue 1772273002: Remove one thread hop while fetching matching rules (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed tbansal comments Created 4 years, 9 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
Index: chrome/browser/android/data_usage/external_data_use_observer_bridge.cc
diff --git a/chrome/browser/android/data_usage/external_data_use_observer_bridge.cc b/chrome/browser/android/data_usage/external_data_use_observer_bridge.cc
index 63e49661b8afda4599d288df6109992e2e8f4885..65195a1c3ae0c63c4fb8133df6819636b9c653f6 100644
--- a/chrome/browser/android/data_usage/external_data_use_observer_bridge.cc
+++ b/chrome/browser/android/data_usage/external_data_use_observer_bridge.cc
@@ -175,6 +175,15 @@ void ExternalDataUseObserverBridge::OnControlAppInstallStateChange(
data_use_tab_model_->OnControlAppInstallStateChange(is_control_app_installed);
tbansal1 2016/03/10 17:44:55 Add: if(!data_use_tab_model_) return;
Raj 2016/03/10 18:30:11 Done.
}
+void ExternalDataUseObserverBridge::ShouldRegisterAsDataUseObserver(
+ bool should_register) const {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ io_task_runner_->PostTask(
+ FROM_HERE,
+ base::Bind(&ExternalDataUseObserver::ShouldRegisterAsDataUseObserver,
+ external_data_use_observer_, should_register));
+}
+
bool RegisterExternalDataUseObserver(JNIEnv* env) {
return RegisterNativesImpl(env);
}

Powered by Google App Engine
This is Rietveld 408576698