Index: chrome/android/java/src/org/chromium/chrome/browser/incognito/IncognitoNotificationService.java |
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/incognito/IncognitoNotificationService.java b/chrome/android/java/src/org/chromium/chrome/browser/incognito/IncognitoNotificationService.java |
index 0eb09992741f1fa3100ce0ec3579dc5c1e81279e..c014631cd5d50ff4bfb83fa7d412caea97c0bd40 100644 |
--- a/chrome/android/java/src/org/chromium/chrome/browser/incognito/IncognitoNotificationService.java |
+++ b/chrome/android/java/src/org/chromium/chrome/browser/incognito/IncognitoNotificationService.java |
@@ -34,7 +34,6 @@ import org.chromium.chrome.browser.util.FeatureUtilities; |
import java.io.File; |
import java.lang.ref.WeakReference; |
-import java.util.ArrayList; |
import java.util.HashSet; |
import java.util.List; |
import java.util.Set; |
@@ -82,13 +81,10 @@ public class IncognitoNotificationService extends IntentService { |
} |
}); |
} else { |
- List<Integer> processedSelectors = closeIncognitoTabsInRunningTabbedActivities(); |
+ closeIncognitoTabsInRunningTabbedActivities(); |
- for (int i = 0; i < TabWindowManager.MAX_SIMULTANEOUS_SELECTORS; i++) { |
- if (processedSelectors.contains(i)) continue; |
- clearedIncognito &= deleteIncognitoStateFilesInDirectory( |
- TabPersistentStore.getOrCreateSelectorStateDirectory(i)); |
- } |
+ clearedIncognito &= deleteIncognitoStateFilesInDirectory( |
Ted C
2016/06/29 23:47:23
this can just be = instead of &= since there are n
Theresa
2016/06/30 00:02:51
Done.
|
+ TabPersistentStore.getOrCreateStateDirectory()); |
} |
// If we failed clearing all of the incognito tabs, then do not dismiss the notification. |
@@ -193,17 +189,13 @@ public class IncognitoNotificationService extends IntentService { |
* Iterate across the running activities and for any running tabbed mode activities close their |
* incognito tabs. |
* |
- * @return The list of window indexes that were processed. |
- * |
* @see TabWindowManager#getIndexForWindow(Activity) |
*/ |
- private List<Integer> closeIncognitoTabsInRunningTabbedActivities() { |
+ private Void closeIncognitoTabsInRunningTabbedActivities() { |
Ted C
2016/06/29 23:47:23
this should be lowercase void now
Theresa
2016/06/30 00:02:51
Done.
|
return ThreadUtils.runOnUiThreadBlockingNoException( |
Ted C
2016/06/29 23:47:23
remove the return and instead of Callable, use a R
Theresa
2016/06/30 00:02:52
Done.
|
- new Callable<List<Integer>>() { |
+ new Callable<Void>() { |
@Override |
- public List<Integer> call() { |
- List<Integer> selectorIndexes = new ArrayList<>(); |
- |
+ public Void call() { |
List<WeakReference<Activity>> runningActivities = |
ApplicationStatus.getRunningActivities(); |
for (int i = 0; i < runningActivities.size(); i++) { |
@@ -216,11 +208,9 @@ public class IncognitoNotificationService extends IntentService { |
tabbedActivity.getTabModelSelector().getModel(true).closeAllTabs( |
false, false); |
- selectorIndexes.add(TabWindowManager.getInstance().getIndexForWindow( |
- tabbedActivity)); |
} |
- return selectorIndexes; |
+ return null; |
} |
}); |
} |