OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 package org.chromium.net; | 5 package org.chromium.net; |
6 | 6 |
7 import android.Manifest; | 7 import android.Manifest; |
8 import android.accounts.Account; | 8 import android.accounts.Account; |
9 import android.accounts.AccountManager; | 9 import android.accounts.AccountManager; |
10 import android.accounts.AccountManagerCallback; | 10 import android.accounts.AccountManagerCallback; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 * - ERR_MISCONFIGURED_AUTH_ENVIRONMENT: The authentication can't be completed
because of some | 52 * - ERR_MISCONFIGURED_AUTH_ENVIRONMENT: The authentication can't be completed
because of some |
53 * issues in the configuration of the app. Some permissions may be missing. | 53 * issues in the configuration of the app. Some permissions may be missing. |
54 * | 54 * |
55 * Please search for the "cr_net_auth" tag in logcat to have more information ab
out the cause of | 55 * Please search for the "cr_net_auth" tag in logcat to have more information ab
out the cause of |
56 * these errors. | 56 * these errors. |
57 * =============================================================================
=================== | 57 * =============================================================================
=================== |
58 */ | 58 */ |
59 @JNINamespace("net::android") | 59 @JNINamespace("net::android") |
60 public class HttpNegotiateAuthenticator { | 60 public class HttpNegotiateAuthenticator { |
61 private static final String TAG = "net_auth"; | 61 private static final String TAG = "net_auth"; |
62 private Bundle mSpnegoContext = null; | 62 private Bundle mSpnegoContext; |
63 private final String mAccountType; | 63 private final String mAccountType; |
64 | 64 |
65 /** | 65 /** |
66 * Structure designed to hold the data related to a specific request across
the various | 66 * Structure designed to hold the data related to a specific request across
the various |
67 * callbacks needed to complete it. | 67 * callbacks needed to complete it. |
68 */ | 68 */ |
69 static class RequestData { | 69 static class RequestData { |
70 /** Native object to post the result to. */ | 70 /** Native object to post the result to. */ |
71 public long nativeResultObject; | 71 public long nativeResultObject; |
72 | 72 |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 | 368 |
369 int permissionResult = | 369 int permissionResult = |
370 context.checkPermission(permission, Process.myPid(), Process.myU
id()); | 370 context.checkPermission(permission, Process.myPid(), Process.myU
id()); |
371 return permissionResult != PackageManager.PERMISSION_GRANTED; | 371 return permissionResult != PackageManager.PERMISSION_GRANTED; |
372 } | 372 } |
373 | 373 |
374 @VisibleForTesting | 374 @VisibleForTesting |
375 native void nativeSetResult( | 375 native void nativeSetResult( |
376 long nativeJavaNegotiateResultWrapper, int status, String authToken)
; | 376 long nativeJavaNegotiateResultWrapper, int status, String authToken)
; |
377 } | 377 } |
OLD | NEW |