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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunGlue.java

Issue 978653002: Upstream FirstRunActivity and friends. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits + remove MobileFreFinishState as it is no longer relevant Created 5 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/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunGlue.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunGlue.java b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunGlue.java
new file mode 100644
index 0000000000000000000000000000000000000000..48b5674e25aee9b80c514764f40c88c178c68582
--- /dev/null
+++ b/chrome/android/java/src/org/chromium/chrome/browser/firstrun/FirstRunGlue.java
@@ -0,0 +1,51 @@
+// Copyright 2015 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.firstrun;
+
+import android.app.Fragment;
+import android.content.Context;
+
+/**
+ * Interface to Glue the FirstRunActivity with the actual preferences and other details.
+ */
+public interface FirstRunGlue {
+ /**
+ * @return Whether the user has accepted Chrome Terms of Service.
+ * @param appContext An application context.
+ */
+ boolean didAcceptTermsOfService(Context appContext);
+
+ /**
+ * @return Whether the "upload crash dump" setting is set to "NEVER".
+ * @param appContext An application context.
+ */
+ boolean isNeverUploadCrashDump(Context appContext);
+
+ /**
+ * Sets the EULA/Terms of Services state as "ACCEPTED".
+ * @param appContext An application context.
+ * @param allowCrashUpload True if the user allows to upload crash dumps and collect stats.
+ */
+ void acceptTermsOfService(Context appContext, boolean allowCrashUpload);
+
+ /**
+ * @return Whether the application is eligible for the Document mode.
+ * @param appContext An application context.
+ */
+ boolean isDocumentModeEligible(Context appContext);
+
+ /**
+ * @return Whether a given account name is the default (first) Android account name.
+ * @param appContext An application context.
+ * @param accountName An account name.
+ */
+ boolean isDefaultAccountName(Context appContext, String accountName);
+
+ /**
+ * Opens the Android account adder UI.
+ * @param fragment A fragment that requested the service.
+ */
+ void openAccountAdder(Fragment fragment);
+}

Powered by Google App Engine
This is Rietveld 408576698