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.chrome.browser.childaccounts; | 5 package org.chromium.chrome.browser.childaccounts; |
6 | 6 |
7 import android.annotation.TargetApi; | 7 import android.annotation.TargetApi; |
8 import android.app.Activity; | 8 import android.app.Activity; |
9 import android.app.ActivityManager; | 9 import android.app.ActivityManager; |
10 import android.content.Context; | 10 import android.content.Context; |
11 import android.content.Intent; | 11 import android.content.Intent; |
12 import android.os.Build; | 12 import android.os.Build; |
13 import android.os.Bundle; | 13 import android.os.Bundle; |
14 | 14 |
15 import org.chromium.chrome.browser.externalauth.ExternalAuthUtils; | 15 import org.chromium.chrome.browser.externalauth.ExternalAuthUtils; |
16 import org.chromium.chrome.browser.firstrun.FirstRunStatus; | 16 import org.chromium.chrome.browser.firstrun.FirstRunStatus; |
17 import org.chromium.chrome.browser.util.IntentUtils; | 17 import org.chromium.chrome.browser.util.IntentUtils; |
18 | 18 |
19 /** | 19 /** |
20 * An activity that allows whitelisted applications to reset all data in Chrome, | 20 * An activity that allows whitelisted applications to reset all data in Chrome, |
21 * as part of the child account setup. | 21 * as part of the child account setup. |
22 */ | 22 */ |
23 public class ResetDataActivity extends Activity { | 23 public class ResetDataActivity extends Activity { |
24 | 24 |
25 /** | 25 /** |
26 * The operation succeeded. Note that this value will only be returned for d
ry runs, because | 26 * The operation succeeded. Note that this value will only be returned for d
ry runs, because |
27 * sucessfully resetting data will kill this process and return | 27 * successfully resetting data will kill this process and return |
28 * {@link Activity#RESULT_CANCELED}. | 28 * {@link Activity#RESULT_CANCELED}. |
29 */ | 29 */ |
30 private static final int RESULT_OK = Activity.RESULT_OK; | 30 private static final int RESULT_OK = Activity.RESULT_OK; |
31 | 31 |
32 /** | 32 /** |
33 * The calling activity is not authorized. This activity is only available t
o Google-signed | 33 * The calling activity is not authorized. This activity is only available t
o Google-signed |
34 * applications. | 34 * applications. |
35 */ | 35 */ |
36 private static final int RESULT_ERROR_UNAUTHORIZED = Activity.RESULT_FIRST_U
SER; | 36 private static final int RESULT_ERROR_UNAUTHORIZED = Activity.RESULT_FIRST_U
SER; |
37 | 37 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 result.putExtra(EXTRA_HAS_DATA, hasData); | 108 result.putExtra(EXTRA_HAS_DATA, hasData); |
109 setResult(RESULT_OK, result); | 109 setResult(RESULT_OK, result); |
110 finish(); | 110 finish(); |
111 } | 111 } |
112 | 112 |
113 private void returnResult(int resultCode) { | 113 private void returnResult(int resultCode) { |
114 setResult(resultCode); | 114 setResult(resultCode); |
115 finish(); | 115 finish(); |
116 } | 116 } |
117 } | 117 } |
OLD | NEW |