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

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

Issue 2298023002: Remove references to OffTheRecord in tabmodel (Closed)
Patch Set: Remove references to OffTheRecord in tabmodel/ Created 4 years, 4 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
Index: chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/OffTheRecordDocumentTabModel.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/OffTheRecordDocumentTabModel.java b/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/OffTheRecordDocumentTabModel.java
deleted file mode 100644
index 4056579d4b0acd3b440300fa02dcf034e8b4b052..0000000000000000000000000000000000000000
--- a/chrome/android/java/src/org/chromium/chrome/browser/tabmodel/document/OffTheRecordDocumentTabModel.java
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-package org.chromium.chrome.browser.tabmodel.document;
-
-import org.chromium.base.VisibleForTesting;
-import org.chromium.chrome.browser.incognito.IncognitoNotificationManager;
-import org.chromium.chrome.browser.tabmodel.EmptyTabModel;
-import org.chromium.chrome.browser.tabmodel.IncognitoTabModel;
-import org.chromium.chrome.browser.tabmodel.TabModel;
-
-/**
- * Implements an Incognito version of the DocumentTabModel. Timing is a little bit different for
- * profile deletion because we don't get all the signals we'd expect when Tabs are closed. More
- * specifically, Android doesn't fire signals when tasks are swiped away from the Recents menu if
- * the Activity is dead when it occurs.
- */
-public class OffTheRecordDocumentTabModel extends IncognitoTabModel implements DocumentTabModel {
- private final ActivityDelegate mActivityDelegate;
-
- public OffTheRecordDocumentTabModel(IncognitoTabModelDelegate offTheRecordDelegate,
- ActivityDelegate delegate) {
- super(offTheRecordDelegate);
- mActivityDelegate = delegate;
- if (delegate.getTasksFromRecents(true).size() > 0) {
- ensureTabModelImpl();
- }
- }
-
- @VisibleForTesting
- public boolean isDocumentTabModelImplCreated() {
- return !(getDelegateModel() instanceof EmptyTabModel);
- }
-
- @Override
- protected void destroyIncognitoIfNecessary() {
- super.destroyIncognitoIfNecessary();
- if (!mActivityDelegate.isIncognitoDocumentAccessibleToUser()) {
- IncognitoNotificationManager.dismissIncognitoNotification();
- }
- }
-
- private DocumentTabModel getDelegateDocumentTabModel() {
- TabModel delegate = getDelegateModel();
- return isDocumentTabModelImplCreated() ? (DocumentTabModel) delegate : null;
- }
-
- @Override
- public String getInitialUrlForDocument(int tabId) {
- if (!isDocumentTabModelImplCreated()) return null;
- return getDelegateDocumentTabModel().getInitialUrlForDocument(tabId);
- }
-}

Powered by Google App Engine
This is Rietveld 408576698