Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java

Issue 1580813005: Whitelist known StrictMode violations to be fixed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java
index 1f16a6bd13cfbc39aee739f3c76c86bcf5b43dde..3cad95583c1cdd9ce50191f2ea701f464f71012c 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/TabPersistentStore.java
@@ -905,7 +905,14 @@ public class TabPersistentStore extends TabPersister {
}
private void cleanupAllEncryptedPersistentData() {
- String[] files = getStateDirectory().list();
+ String[] files = null;
+ // Temporarily allowing disk access. TODO: Fix. See http://crbug.com/473357
+ StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads();
+ try {
+ files = getStateDirectory().list();
+ } finally {
+ StrictMode.setThreadPolicy(oldPolicy);
+ }
if (files != null) {
for (String file : files) {
if (file.startsWith(TabState.SAVED_TAB_STATE_FILE_PREFIX_INCOGNITO)) {
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/preferences/PrefServiceBridge.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698