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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/document/DocumentActivity.java

Issue 1368553002: Revert of [Android]Don't check for child account/EDU device for every activity. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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.document; 5 package org.chromium.chrome.browser.document;
6 6
7 import android.annotation.TargetApi; 7 import android.annotation.TargetApi;
8 import android.content.Intent; 8 import android.content.Intent;
9 import android.graphics.Bitmap; 9 import android.graphics.Bitmap;
10 import android.os.Build; 10 import android.os.Build;
(...skipping 15 matching lines...) Expand all
26 import org.chromium.chrome.browser.ChromeActivity; 26 import org.chromium.chrome.browser.ChromeActivity;
27 import org.chromium.chrome.browser.ChromeApplication; 27 import org.chromium.chrome.browser.ChromeApplication;
28 import org.chromium.chrome.browser.IntentHandler; 28 import org.chromium.chrome.browser.IntentHandler;
29 import org.chromium.chrome.browser.KeyboardShortcuts; 29 import org.chromium.chrome.browser.KeyboardShortcuts;
30 import org.chromium.chrome.browser.TabState; 30 import org.chromium.chrome.browser.TabState;
31 import org.chromium.chrome.browser.UrlUtilities; 31 import org.chromium.chrome.browser.UrlUtilities;
32 import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.Context ualSearchPanel.StateChangeReason; 32 import org.chromium.chrome.browser.compositor.bottombar.contextualsearch.Context ualSearchPanel.StateChangeReason;
33 import org.chromium.chrome.browser.compositor.layouts.LayoutManagerDocument; 33 import org.chromium.chrome.browser.compositor.layouts.LayoutManagerDocument;
34 import org.chromium.chrome.browser.document.DocumentTab.DocumentTabObserver; 34 import org.chromium.chrome.browser.document.DocumentTab.DocumentTabObserver;
35 import org.chromium.chrome.browser.enhancedbookmarks.EnhancedBookmarkUtils; 35 import org.chromium.chrome.browser.enhancedbookmarks.EnhancedBookmarkUtils;
36 import org.chromium.chrome.browser.firstrun.FirstRunSigninProcessor; 36 import org.chromium.chrome.browser.firstrun.FirstRunSignInProcessor;
37 import org.chromium.chrome.browser.firstrun.FirstRunStatus; 37 import org.chromium.chrome.browser.firstrun.FirstRunStatus;
38 import org.chromium.chrome.browser.metrics.UmaUtils; 38 import org.chromium.chrome.browser.metrics.UmaUtils;
39 import org.chromium.chrome.browser.ntp.NewTabPage; 39 import org.chromium.chrome.browser.ntp.NewTabPage;
40 import org.chromium.chrome.browser.preferences.ChromePreferenceManager; 40 import org.chromium.chrome.browser.preferences.ChromePreferenceManager;
41 import org.chromium.chrome.browser.preferences.PrefServiceBridge; 41 import org.chromium.chrome.browser.preferences.PrefServiceBridge;
42 import org.chromium.chrome.browser.preferences.datareduction.DataReductionPrefer ences; 42 import org.chromium.chrome.browser.preferences.datareduction.DataReductionPrefer ences;
43 import org.chromium.chrome.browser.preferences.datareduction.DataReductionPromoS creen; 43 import org.chromium.chrome.browser.preferences.datareduction.DataReductionPromoS creen;
44 import org.chromium.chrome.browser.signin.SigninPromoScreen; 44 import org.chromium.chrome.browser.signin.SigninPromoScreen;
45 import org.chromium.chrome.browser.ssl.ConnectionSecurityLevel; 45 import org.chromium.chrome.browser.ssl.ConnectionSecurityLevel;
46 import org.chromium.chrome.browser.tab.Tab; 46 import org.chromium.chrome.browser.tab.Tab;
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 // Data reduction promo should be temporarily suppressed if the sign in promo is 206 // Data reduction promo should be temporarily suppressed if the sign in promo is
207 // shown to avoid nagging users too much. 207 // shown to avoid nagging users too much.
208 if (!SigninPromoScreen.launchSigninPromoIfNeeded(this)) { 208 if (!SigninPromoScreen.launchSigninPromoIfNeeded(this)) {
209 DataReductionPromoScreen.launchDataReductionPromo(this); 209 DataReductionPromoScreen.launchDataReductionPromo(this);
210 } 210 }
211 } else { 211 } else {
212 preferenceManager.setPromosSkippedOnFirstStart(true); 212 preferenceManager.setPromosSkippedOnFirstStart(true);
213 } 213 }
214 } 214 }
215 215
216 FirstRunSigninProcessor.start(this); 216 FirstRunSignInProcessor.start(this);
217 217
218 if (!preferenceManager.hasAttemptedMigrationOnUpgrade()) { 218 if (!preferenceManager.hasAttemptedMigrationOnUpgrade()) {
219 InitializationObserver observer = new InitializationObserver( 219 InitializationObserver observer = new InitializationObserver(
220 ChromeApplication.getDocumentTabModelSelector().getModel(fal se)) { 220 ChromeApplication.getDocumentTabModelSelector().getModel(fal se)) {
221 @Override 221 @Override
222 protected void runImmediately() { 222 protected void runImmediately() {
223 DocumentMigrationHelper.migrateTabsToDocumentForUpgrade(Docu mentActivity.this, 223 DocumentMigrationHelper.migrateTabsToDocumentForUpgrade(Docu mentActivity.this,
224 DocumentMigrationHelper.FINALIZE_MODE_NO_ACTION); 224 DocumentMigrationHelper.FINALIZE_MODE_NO_ACTION);
225 } 225 }
226 226
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 850
851 /** 851 /**
852 * Launch a new DocumentActivity showing the new tab page. 852 * Launch a new DocumentActivity showing the new tab page.
853 * @param incognito Whether the new NTP should be in incognito mode. 853 * @param incognito Whether the new NTP should be in incognito mode.
854 */ 854 */
855 private void launchNtp(boolean incognito) { 855 private void launchNtp(boolean incognito) {
856 if (incognito && !PrefServiceBridge.getInstance().isIncognitoModeEnabled ()) return; 856 if (incognito && !PrefServiceBridge.getInstance().isIncognitoModeEnabled ()) return;
857 getTabCreator(incognito).launchNTP(); 857 getTabCreator(incognito).launchNTP();
858 } 858 }
859 } 859 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698