| OLD | NEW |
| 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.preferences.privacy; | 5 package org.chromium.chrome.browser.preferences.privacy; |
| 6 | 6 |
| 7 import android.content.Intent; | 7 import android.content.Intent; |
| 8 import android.os.AsyncTask; | 8 import android.os.AsyncTask; |
| 9 import android.preference.CheckBoxPreference; | 9 import android.preference.CheckBoxPreference; |
| 10 import android.preference.Preference; | 10 import android.preference.Preference; |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 } | 437 } |
| 438 }); | 438 }); |
| 439 } | 439 } |
| 440 | 440 |
| 441 /** This runnable marks the given origins as important. */ | 441 /** This runnable marks the given origins as important. */ |
| 442 private Runnable getMarkOriginsAsImportantRunnable(final String[] importantO
rigins) { | 442 private Runnable getMarkOriginsAsImportantRunnable(final String[] importantO
rigins) { |
| 443 return new Runnable() { | 443 return new Runnable() { |
| 444 @Override | 444 @Override |
| 445 public void run() { | 445 public void run() { |
| 446 for (String origin : importantOrigins) { | 446 for (String origin : importantOrigins) { |
| 447 PrefServiceBridge.markOriginAsImportantForTesting(origin); | 447 BrowsingDataBridge.markOriginAsImportantForTesting(origin); |
| 448 } | 448 } |
| 449 } | 449 } |
| 450 }; | 450 }; |
| 451 } | 451 } |
| 452 | 452 |
| 453 /** | 453 /** |
| 454 * Tests that the important sites dialog is shown, and if we don't deselect
anything we | 454 * Tests that the important sites dialog is shown, and if we don't deselect
anything we |
| 455 * correctly clear everything. | 455 * correctly clear everything. |
| 456 */ | 456 */ |
| 457 @CommandLineFlags.Add({"enable-features=ImportantSitesInCBD", "enable-site-e
ngagement"}) | 457 @CommandLineFlags.Add({"enable-features=ImportantSitesInCBD", "enable-site-e
ngagement"}) |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 public void run() { | 605 public void run() { |
| 606 for (DialogOption option : DialogOption.values()) { | 606 for (DialogOption option : DialogOption.values()) { |
| 607 boolean enabled = typesToClear.contains(option); | 607 boolean enabled = typesToClear.contains(option); |
| 608 PrefServiceBridge.getInstance().setBrowsingDataDeletionPrefe
rence( | 608 PrefServiceBridge.getInstance().setBrowsingDataDeletionPrefe
rence( |
| 609 option.getDataType(), ClearBrowsingDataTab.ADVANCED,
enabled); | 609 option.getDataType(), ClearBrowsingDataTab.ADVANCED,
enabled); |
| 610 } | 610 } |
| 611 } | 611 } |
| 612 }); | 612 }); |
| 613 } | 613 } |
| 614 } | 614 } |
| OLD | NEW |