| 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; |
| 11 import android.app.backup.BackupAgent; | 11 import android.app.backup.BackupAgent; |
| 12 import android.app.backup.BackupDataInput; | 12 import android.app.backup.BackupDataInput; |
| 13 import android.app.backup.BackupDataOutput; | 13 import android.app.backup.BackupDataOutput; |
| 14 import android.content.Context; | 14 import android.content.Context; |
| 15 import android.content.SharedPreferences; | 15 import android.content.SharedPreferences; |
| 16 import android.os.Build; | 16 import android.os.Build; |
| 17 import android.os.ParcelFileDescriptor; | 17 import android.os.ParcelFileDescriptor; |
| 18 | 18 |
| 19 import org.chromium.base.ContextUtils; | 19 import org.chromium.base.ContextUtils; |
| 20 import org.chromium.base.Log; | 20 import org.chromium.base.Log; |
| 21 import org.chromium.base.StreamUtil; | 21 import org.chromium.base.StreamUtil; |
| 22 import org.chromium.base.VisibleForTesting; | 22 import org.chromium.base.VisibleForTesting; |
| 23 import org.chromium.base.annotations.SuppressFBWarnings; | 23 import org.chromium.base.annotations.SuppressFBWarnings; |
| 24 import org.chromium.chrome.browser.firstrun.FirstRunSignInProcessor; | 24 import org.chromium.chrome.browser.firstrun.FirstRunSignInProcessor; |
| 25 import org.chromium.chrome.browser.firstrun.FirstRunStatus; | 25 import org.chromium.chrome.browser.firstrun.FirstRunStatus; |
| 26 import org.chromium.chrome.browser.init.ChromeBrowserInitializer; | 26 import org.chromium.chrome.browser.init.ChromeBrowserInitializer; |
| 27 import org.chromium.chrome.browser.preferences.privacy.PrivacyPreferences; | 27 import org.chromium.chrome.browser.preferences.privacy.PrivacyPreferences; |
| 28 import org.chromium.sync.signin.ChromeSigninController; | 28 import org.chromium.components.sync.signin.ChromeSigninController; |
| 29 import org.json.JSONException; | 29 import org.json.JSONException; |
| 30 import org.json.JSONObject; | 30 import org.json.JSONObject; |
| 31 | 31 |
| 32 import java.io.File; | 32 import java.io.File; |
| 33 import java.io.FileInputStream; | 33 import java.io.FileInputStream; |
| 34 import java.io.FileNotFoundException; | 34 import java.io.FileNotFoundException; |
| 35 import java.io.FileOutputStream; | 35 import java.io.FileOutputStream; |
| 36 import java.io.IOException; | 36 import java.io.IOException; |
| 37 import java.io.InputStream; | 37 import java.io.InputStream; |
| 38 import java.io.OutputStream; | 38 import java.io.OutputStream; |
| (...skipping 244 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 |