OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.tabmodel; | 5 package org.chromium.chrome.browser.tabmodel; |
6 | 6 |
7 import android.content.Context; | 7 import android.content.Context; |
8 import android.os.AsyncTask; | 8 import android.os.AsyncTask; |
9 import android.os.StrictMode; | 9 import android.os.StrictMode; |
10 import android.os.SystemClock; | 10 import android.os.SystemClock; |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
156 */ | 156 */ |
157 public TabPersistentStore(TabModelSelector modelSelector, int selectorIndex, Context context, | 157 public TabPersistentStore(TabModelSelector modelSelector, int selectorIndex, Context context, |
158 TabCreatorManager tabCreatorManager, TabPersistentStoreObserver obse rver) { | 158 TabCreatorManager tabCreatorManager, TabPersistentStoreObserver obse rver) { |
159 mTabModelSelector = modelSelector; | 159 mTabModelSelector = modelSelector; |
160 mContext = context; | 160 mContext = context; |
161 mTabCreatorManager = tabCreatorManager; | 161 mTabCreatorManager = tabCreatorManager; |
162 mTabsToSave = new ArrayDeque<Tab>(); | 162 mTabsToSave = new ArrayDeque<Tab>(); |
163 mTabsToRestore = new ArrayDeque<TabRestoreDetails>(); | 163 mTabsToRestore = new ArrayDeque<TabRestoreDetails>(); |
164 mSelectorIndex = selectorIndex; | 164 mSelectorIndex = selectorIndex; |
165 mObserver = observer; | 165 mObserver = observer; |
166 logExecutionTime("DO NOT SUBMIT", 10); | |
Yaron
2016/01/19 15:57:26
remove
Peter Wen
2016/01/20 20:14:03
Done.
| |
166 createMigrationTask(); | 167 createMigrationTask(); |
167 } | 168 } |
168 | 169 |
169 private final void createMigrationTask() { | 170 private final void createMigrationTask() { |
170 synchronized (MIGRATION_LOCK) { | 171 synchronized (MIGRATION_LOCK) { |
171 if (sMigrationTask == null) { | 172 if (sMigrationTask == null) { |
172 sMigrationTask = new FileMigrationTask(); | 173 sMigrationTask = new FileMigrationTask(); |
173 sMigrationTask.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR); | 174 sMigrationTask.executeOnExecutor(AsyncTask.SERIAL_EXECUTOR); |
174 } | 175 } |
175 } | 176 } |
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1059 return tabState.isIncognito(); | 1060 return tabState.isIncognito(); |
1060 } else if (tabDetails.isIncognito != null) { | 1061 } else if (tabDetails.isIncognito != null) { |
1061 // The TabState couldn't be restored, but we have some information a bout the tab. | 1062 // The TabState couldn't be restored, but we have some information a bout the tab. |
1062 return tabDetails.isIncognito; | 1063 return tabDetails.isIncognito; |
1063 } else { | 1064 } else { |
1064 // The tab's type is undecideable. | 1065 // The tab's type is undecideable. |
1065 return false; | 1066 return false; |
1066 } | 1067 } |
1067 } | 1068 } |
1068 } | 1069 } |
OLD | NEW |