| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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.preferences.privacy; | 5 package org.chromium.chrome.browser.preferences.privacy; |
| 6 | 6 |
| 7 import android.app.Fragment; | 7 import android.app.Fragment; |
| 8 import android.app.FragmentManager; | 8 import android.app.FragmentManager; |
| 9 import android.content.Context; | 9 import android.content.Context; |
| 10 import android.os.Bundle; | 10 import android.os.Bundle; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 import org.chromium.chrome.browser.preferences.Preferences; | 23 import org.chromium.chrome.browser.preferences.Preferences; |
| 24 | 24 |
| 25 import java.util.Locale; | 25 import java.util.Locale; |
| 26 | 26 |
| 27 /** | 27 /** |
| 28 * Fragment with a {@link TabLayout} containing a basic and an advanced version
of the CBD dialog. | 28 * Fragment with a {@link TabLayout} containing a basic and an advanced version
of the CBD dialog. |
| 29 */ | 29 */ |
| 30 public class ClearBrowsingDataTabsFragment extends Fragment { | 30 public class ClearBrowsingDataTabsFragment extends Fragment { |
| 31 public static final int CBD_TAB_COUNT = 2; | 31 public static final int CBD_TAB_COUNT = 2; |
| 32 | 32 |
| 33 public ClearBrowsingDataTabsFragment() {} | 33 public ClearBrowsingDataTabsFragment() { |
| 34 // TODO(dullweber): Remove this migration after after three milestones (
probably M61) |
| 35 PrefServiceBridge.getInstance().migrateBrowsingDataPreferences(); |
| 36 } |
| 34 | 37 |
| 38 /** |
| 39 * @return Returns whether the CBD dialog with tabs is enabled. |
| 40 */ |
| 35 public static boolean isFeatureEnabled() { | 41 public static boolean isFeatureEnabled() { |
| 36 return ChromeFeatureList.isEnabled(ChromeFeatureList.TABS_IN_CBD); | 42 return ChromeFeatureList.isEnabled(ChromeFeatureList.TABS_IN_CBD); |
| 37 } | 43 } |
| 38 | 44 |
| 39 @Override | 45 @Override |
| 40 public void onCreate(Bundle savedInstanceState) { | 46 public void onCreate(Bundle savedInstanceState) { |
| 41 super.onCreate(savedInstanceState); | 47 super.onCreate(savedInstanceState); |
| 42 } | 48 } |
| 43 | 49 |
| 44 /* | 50 /* |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 PrefServiceBridge.getInstance().setLastSelectedClearBrowsingDataTab(
tabIndex); | 138 PrefServiceBridge.getInstance().setLastSelectedClearBrowsingDataTab(
tabIndex); |
| 133 } | 139 } |
| 134 | 140 |
| 135 @Override | 141 @Override |
| 136 public void onTabUnselected(TabLayout.Tab tab) {} | 142 public void onTabUnselected(TabLayout.Tab tab) {} |
| 137 | 143 |
| 138 @Override | 144 @Override |
| 139 public void onTabReselected(TabLayout.Tab tab) {} | 145 public void onTabReselected(TabLayout.Tab tab) {} |
| 140 } | 146 } |
| 141 } | 147 } |
| OLD | NEW |