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

Unified Diff: blimp/client/core/android/java/src/org/chromium/blimp/core/settings/PreferencesUtil.java

Issue 2173563003: Blimp settings UI integration for Chrome, everything still lives in Blimp. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nit issues, and prepare to commit. Created 4 years, 5 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: blimp/client/core/android/java/src/org/chromium/blimp/core/settings/PreferencesUtil.java
diff --git a/blimp/client/core/android/java/src/org/chromium/blimp/core/settings/PreferencesUtil.java b/blimp/client/core/android/java/src/org/chromium/blimp/core/settings/PreferencesUtil.java
new file mode 100644
index 0000000000000000000000000000000000000000..e1c5269663e0ca14c6e70a1a3801d9482fc0eb06
--- /dev/null
+++ b/blimp/client/core/android/java/src/org/chromium/blimp/core/settings/PreferencesUtil.java
@@ -0,0 +1,25 @@
+// 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.blimp.core.settings;
+
+import org.chromium.base.ContextUtils;
+
+/**
+ * Blimp preferences utilities.
+ */
+public class PreferencesUtil {
+ private static final String DEFAULT_ASSIGNER_URL =
+ "https://dev-blimp-pa.sandbox.googleapis.com/v1/assignment";
+
+ /**
+ * Reads the last used assigner from shared preference.
+ * @return The saved value of assigner preference, or the default development assigner URL
+ * if we didn't find the shared preference.
+ */
+ public static String getLastUsedAssigner() {
+ return ContextUtils.getAppSharedPreferences().getString(
+ AboutBlimpPreferences.PREF_ASSIGNER_URL, DEFAULT_ASSIGNER_URL);
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698