| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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.history; | 5 package org.chromium.chrome.browser.history; |
| 6 | 6 |
| 7 import android.os.Bundle; | 7 import android.os.Bundle; |
| 8 | 8 |
| 9 import org.chromium.base.VisibleForTesting; | 9 import org.chromium.base.VisibleForTesting; |
| 10 import org.chromium.chrome.browser.SnackbarActivity; | 10 import org.chromium.chrome.browser.SnackbarActivity; |
| 11 | 11 |
| 12 /** | 12 /** |
| 13 * Activity for displaying the browsing history manager. | 13 * Activity for displaying the browsing history manager. |
| 14 */ | 14 */ |
| 15 public class HistoryActivity extends SnackbarActivity { | 15 public class HistoryActivity extends SnackbarActivity { |
| 16 private HistoryManager mHistoryManager; | 16 private HistoryManager mHistoryManager; |
| 17 | 17 |
| 18 @Override | 18 @Override |
| 19 public void onCreate(Bundle savedInstanceState) { | 19 public void onCreate(Bundle savedInstanceState) { |
| 20 super.onCreate(savedInstanceState); | 20 super.onCreate(savedInstanceState); |
| 21 | 21 |
| 22 mHistoryManager = new HistoryManager(this, null); | 22 mHistoryManager = new HistoryManager(this, true); |
| 23 setContentView(mHistoryManager.getView()); | 23 setContentView(mHistoryManager.getView()); |
| 24 } | 24 } |
| 25 | 25 |
| 26 @Override | 26 @Override |
| 27 protected void onDestroy() { | 27 protected void onDestroy() { |
| 28 mHistoryManager.onDestroyed(); | 28 mHistoryManager.onDestroyed(); |
| 29 mHistoryManager = null; | 29 mHistoryManager = null; |
| 30 super.onDestroy(); | 30 super.onDestroy(); |
| 31 } | 31 } |
| 32 | 32 |
| 33 @VisibleForTesting | 33 @VisibleForTesting |
| 34 HistoryManager getHistoryManagerForTests() { | 34 HistoryManager getHistoryManagerForTests() { |
| 35 return mHistoryManager; | 35 return mHistoryManager; |
| 36 } | 36 } |
| 37 } | 37 } |
| OLD | NEW |