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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/signin/GoogleActivityController.java

Issue 1880203002: Add Google Activity Controls preference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/android/java/src/org/chromium/chrome/browser/signin/GoogleActivityController.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/signin/GoogleActivityController.java b/chrome/android/java/src/org/chromium/chrome/browser/signin/GoogleActivityController.java
new file mode 100644
index 0000000000000000000000000000000000000000..7217a297538b10ac831d9e3d055ddd460ca15ea7
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/signin/GoogleActivityController.java
@@ -0,0 +1,32 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.chrome.browser.signin;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.net.Uri;
+import android.provider.Browser;
+
+import org.chromium.chrome.browser.UrlConstants;
+
+/**
+* Controls how Google uses Chrome data to personalize Search and other Google services.
+*/
+public class GoogleActivityController {
+ /**
+ * Opens the "Web & App Activity" settings that allows the user to control how Google uses Chrome
+ * browsing history.
+ * @param activity The activity to open the settings.
+ * @param accountName The account for which is requested.
+ */
+ public void openWebAndAppActivitySettings(Activity activity, String accountName) {
+ Intent intent = new Intent(
+ Intent.ACTION_VIEW, Uri.parse(UrlConstants.GOOGLE_ACCOUNT_ACTIVITY_CONTROLS_URL));
+ intent.putExtra(Browser.EXTRA_APPLICATION_ID, activity.getPackageName());
+ intent.putExtra(Browser.EXTRA_CREATE_NEW_TAB, true);
+ intent.setPackage(activity.getPackageName());
+ activity.startActivity(intent);
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698