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

Unified Diff: chrome/browser/android/ntp/ntp_snippets_bridge.cc

Issue 2790183002: Add UMA for the content suggestions settings (Closed)
Patch Set: address comments and rebase Created 3 years, 8 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/ntp/ntp_snippets_bridge.cc
diff --git a/chrome/browser/android/ntp/ntp_snippets_bridge.cc b/chrome/browser/android/ntp/ntp_snippets_bridge.cc
index c84df9a6ca293eeaae2cbee642d6ce1ba38a14e2..ddf1b785a3f70c36286e8b8295267aa82aa820a7 100644
--- a/chrome/browser/android/ntp/ntp_snippets_bridge.cc
+++ b/chrome/browser/android/ntp/ntp_snippets_bridge.cc
@@ -157,20 +157,19 @@ static void OnSuggestionTargetVisited(JNIEnv* env,
base::TimeDelta::FromMilliseconds(visit_time_ms));
}
-static void SetRemoteSuggestionsServiceEnabled(
- JNIEnv* env,
- const JavaParamRef<jclass>& caller,
- jboolean enabled) {
+static void SetRemoteSuggestionsEnabled(JNIEnv* env,
+ const JavaParamRef<jclass>& caller,
+ jboolean enabled) {
ntp_snippets::ContentSuggestionsService* content_suggestions_service =
ContentSuggestionsServiceFactory::GetForProfile(
ProfileManager::GetLastUsedProfile());
if (!content_suggestions_service)
return;
- content_suggestions_service->SetRemoteSuggestionsServiceEnabled(enabled);
+ content_suggestions_service->SetRemoteSuggestionsEnabled(enabled);
}
-static jboolean IsRemoteSuggestionsServiceEnabled(
+static jboolean AreRemoteSuggestionsEnabled(
JNIEnv* env,
const JavaParamRef<jclass>& caller) {
ntp_snippets::ContentSuggestionsService* content_suggestions_service =
@@ -179,11 +178,11 @@ static jboolean IsRemoteSuggestionsServiceEnabled(
if (!content_suggestions_service)
return false;
- return content_suggestions_service->IsRemoteSuggestionsServiceEnabled();
+ return content_suggestions_service->AreRemoteSuggestionsEnabled();
}
-// Returns true if the remote service is managed by an adminstrator's policy.
-static jboolean IsRemoteSuggestionsServiceManaged(
+// Returns true if the remote provider is managed by an adminstrator's policy.
+static jboolean AreRemoteSuggestionsManaged(
JNIEnv* env,
const JavaParamRef<jclass>& caller) {
ntp_snippets::ContentSuggestionsService* content_suggestions_service =
@@ -192,11 +191,11 @@ static jboolean IsRemoteSuggestionsServiceManaged(
if (!content_suggestions_service)
return false;
- return content_suggestions_service->IsRemoteSuggestionsServiceManaged();
+ return content_suggestions_service->AreRemoteSuggestionsManaged();
}
-// Returns true if the remote service is managed by a supervisor
-static jboolean IsRemoteSuggestionsServiceManagedByCustodian(
+// Returns true if the remote provider is managed by a supervisor
+static jboolean AreRemoteSuggestionsManagedByCustodian(
JNIEnv* env,
const JavaParamRef<jclass>& caller) {
ntp_snippets::ContentSuggestionsService* content_suggestions_service =
@@ -205,8 +204,7 @@ static jboolean IsRemoteSuggestionsServiceManagedByCustodian(
if (!content_suggestions_service)
return false;
- return content_suggestions_service
- ->IsRemoteSuggestionsServiceManagedByCustodian();
+ return content_suggestions_service->AreRemoteSuggestionsManagedByCustodian();
}
static void SetContentSuggestionsNotificationsEnabled(

Powered by Google App Engine
This is Rietveld 408576698