Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / android / java / src / org / chromium / chrome / browser / signin / OAuth2TokenService.java
index 6e90ed8..27e2d12 100644 (file)
@@ -138,13 +138,12 @@ public final class OAuth2TokenService {
 
         AccountManagerHelper accountManagerHelper = AccountManagerHelper.get(context);
         accountManagerHelper.getAuthTokenFromForeground(
-            null, account, oauth2Scope, new AccountManagerHelper.GetAuthTokenCallback() {
-                @Override
-                public void tokenAvailable(String token) {
-                    nativeOAuth2TokenFetched(
-                        token, token != null, nativeCallback);
-                }
-            });
+                null, account, oauth2Scope, new AccountManagerHelper.GetAuthTokenCallback() {
+                    @Override
+                    public void tokenAvailable(String token) {
+                        nativeOAuth2TokenFetched(token, token != null, nativeCallback);
+                    }
+                });
     }
 
     /**
@@ -155,9 +154,9 @@ public final class OAuth2TokenService {
      * @param scope The scope to get an auth token for (without Android-style 'oauth2:' prefix).
      * @param callback called on successful and unsuccessful fetching of auth token.
      */
-    public static void getOAuth2AccessToken(Context context, @Nullable Activity activity,
-                                            Account account, String scope,
-                                            AccountManagerHelper.GetAuthTokenCallback callback) {
+    public static void getOAuth2AccessToken(
+            Context context, @Nullable Activity activity, Account account, String scope,
+            AccountManagerHelper.GetAuthTokenCallback callback) {
         String oauth2Scope = OAUTH2_SCOPE_PREFIX + scope;
         AccountManagerHelper.get(context).getAuthTokenFromForeground(
                 activity, account, oauth2Scope, callback);
@@ -194,8 +193,8 @@ public final class OAuth2TokenService {
             if (semaphore.tryAcquire(timeout, unit)) {
                 return result.get();
             } else {
-                Log.d(TAG, "Failed to retrieve auth token within timeout (" +
-                        timeout + " + " + unit.name() + ")");
+                Log.d(TAG, "Failed to retrieve auth token within timeout ("
+                        timeout + " + " + unit.name() + ")");
                 return null;
             }
         } catch (InterruptedException e) {
@@ -296,8 +295,8 @@ public final class OAuth2TokenService {
     @CalledByNative
     private static void saveStoredAccounts(Context context, String[] accounts) {
         Set<String> set = new HashSet<String>(Arrays.asList(accounts));
-        PreferenceManager.getDefaultSharedPreferences(context).edit().
-                putStringSet(STORED_ACCOUNTS_KEY, set).apply();
+        PreferenceManager.getDefaultSharedPreferences(context).edit()
+                .putStringSet(STORED_ACCOUNTS_KEY, set).apply();
     }
 
     private static native Object nativeGetForProfile(Profile profile);