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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/physicalweb/UrlManager.java

Issue 1891273005: Clear settings in Physical Web test setup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use CriteriaHelper Created 4 years, 8 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
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/physicalweb/ListUrlsActivityTest.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.physicalweb; 5 package org.chromium.chrome.browser.physicalweb;
6 6
7 import android.app.AlarmManager; 7 import android.app.AlarmManager;
8 import android.app.Notification; 8 import android.app.Notification;
9 import android.app.NotificationManager; 9 import android.app.NotificationManager;
10 import android.app.PendingIntent; 10 import android.app.PendingIntent;
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 @VisibleForTesting 477 @VisibleForTesting
478 void overridePwsClientForTesting(PwsClient pwsClient) { 478 void overridePwsClientForTesting(PwsClient pwsClient) {
479 mPwsClient = pwsClient; 479 mPwsClient = pwsClient;
480 } 480 }
481 481
482 @VisibleForTesting 482 @VisibleForTesting
483 void overrideNotificationManagerForTesting( 483 void overrideNotificationManagerForTesting(
484 NotificationManagerProxy notificationManager) { 484 NotificationManagerProxy notificationManager) {
485 mNotificationManager = notificationManager; 485 mNotificationManager = notificationManager;
486 } 486 }
487
488 @VisibleForTesting
489 static void clearPrefsForTesting(Context context) {
490 PreferenceManager.getDefaultSharedPreferences(context).edit()
491 .remove(PREFS_VERSION_KEY)
492 .remove(PREFS_NEARBY_URLS_KEY)
493 .remove(PREFS_RESOLVED_URLS_KEY)
494 .remove(PREFS_NOTIFICATION_UPDATE_TIMESTAMP)
495 .apply();
496 }
487 } 497 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/physicalweb/ListUrlsActivityTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698