OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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; | 5 package org.chromium.chrome.browser; |
6 | 6 |
7 import android.accounts.Account; | 7 import android.accounts.Account; |
8 import android.accounts.AccountManager; | 8 import android.accounts.AccountManager; |
9 import android.annotation.SuppressLint; | 9 import android.annotation.SuppressLint; |
10 import android.annotation.TargetApi; | 10 import android.annotation.TargetApi; |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 | 53 |
54 // Lists of preferences that should be restored unchanged. | 54 // Lists of preferences that should be restored unchanged. |
55 | 55 |
56 private static final String[] RESTORED_ANDROID_PREFS = { | 56 private static final String[] RESTORED_ANDROID_PREFS = { |
57 FirstRunStatus.FIRST_RUN_FLOW_COMPLETE, | 57 FirstRunStatus.FIRST_RUN_FLOW_COMPLETE, |
58 FirstRunStatus.LIGHTWEIGHT_FIRST_RUN_FLOW_COMPLETE, | 58 FirstRunStatus.LIGHTWEIGHT_FIRST_RUN_FLOW_COMPLETE, |
59 FirstRunSignInProcessor.FIRST_RUN_FLOW_SIGNIN_SETUP, | 59 FirstRunSignInProcessor.FIRST_RUN_FLOW_SIGNIN_SETUP, |
60 PrivacyPreferencesManager.PREF_METRICS_REPORTING, | 60 PrivacyPreferencesManager.PREF_METRICS_REPORTING, |
61 }; | 61 }; |
62 | 62 |
63 // Sync preferences, all in C++ sync_driver::prefs namespace. | 63 // Sync preferences, all in C++ syncer::prefs namespace. |
64 // | 64 // |
65 // TODO(aberent): These should ideally use the constants that are used to ac
cess the preferences | 65 // TODO(aberent): These should ideally use the constants that are used to ac
cess the preferences |
66 // elsewhere, but those are currently only exist in C++, so doing so would r
equire some | 66 // elsewhere, but those are currently only exist in C++, so doing so would r
equire some |
67 // reorganization. | 67 // reorganization. |
68 private static final String[][] RESTORED_CHROME_PREFS = { | 68 private static final String[][] RESTORED_CHROME_PREFS = { |
69 // kSyncFirstSetupComplete | 69 // kSyncFirstSetupComplete |
70 {"sync", "has_setup_completed"}, | 70 {"sync", "has_setup_completed"}, |
71 // kSyncKeepEverythingSynced | 71 // kSyncKeepEverythingSynced |
72 {"sync", "keep_everything_synced"}, | 72 {"sync", "keep_everything_synced"}, |
73 // kSyncAutofillProfile | 73 // kSyncAutofillProfile |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 private void deleteFileIfPossible(File file) { | 283 private void deleteFileIfPossible(File file) { |
284 // Ignore result. There is nothing else we can do if the delete fails. | 284 // Ignore result. There is nothing else we can do if the delete fails. |
285 file.delete(); | 285 file.delete(); |
286 } | 286 } |
287 | 287 |
288 @VisibleForTesting | 288 @VisibleForTesting |
289 static void allowChromeApplicationForTesting() { | 289 static void allowChromeApplicationForTesting() { |
290 sAllowChromeApplication = true; | 290 sAllowChromeApplication = true; |
291 } | 291 } |
292 } | 292 } |
OLD | NEW |