| 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.test.partnercustomizations; | 5 package org.chromium.chrome.test.partnercustomizations; |
| 6 | 6 |
| 7 import android.database.Cursor; | 7 import android.database.Cursor; |
| 8 import android.net.Uri; | 8 import android.net.Uri; |
| 9 import android.os.Bundle; | 9 import android.os.Bundle; |
| 10 import android.text.TextUtils; | 10 import android.text.TextUtils; |
| 11 | 11 |
| 12 import org.chromium.base.annotations.MainDex; |
| 13 |
| 12 import java.util.List; | 14 import java.util.List; |
| 13 | 15 |
| 14 /** | 16 /** |
| 15 * PartnerBrowserCustomizationsProvider example for testing. This adds one secon
d latency for | 17 * PartnerBrowserCustomizationsProvider example for testing. This adds one secon
d latency for |
| 16 * query function. | 18 * query function. |
| 17 * Note: if you move or rename this class, make sure you have also updated Andro
idManifest.xml. | 19 * Note: if you move or rename this class, make sure you have also updated Andro
idManifest.xml. |
| 18 */ | 20 */ |
| 19 public class TestPartnerBrowserCustomizationsDelayedProvider extends | 21 @MainDex |
| 20 TestPartnerBrowserCustomizationsProvider { | 22 public class TestPartnerBrowserCustomizationsDelayedProvider |
| 21 | 23 extends TestPartnerBrowserCustomizationsProvider { |
| 22 private static String sUriPathToDelay; | 24 private static String sUriPathToDelay; |
| 23 | 25 |
| 24 public TestPartnerBrowserCustomizationsDelayedProvider() { | 26 public TestPartnerBrowserCustomizationsDelayedProvider() { |
| 25 super(); | 27 super(); |
| 26 mTag = TestPartnerBrowserCustomizationsDelayedProvider.class.getSimpleNa
me(); | 28 mTag = TestPartnerBrowserCustomizationsDelayedProvider.class.getSimpleNa
me(); |
| 27 } | 29 } |
| 28 | 30 |
| 29 private void setUriPathToDelay(String path) { | 31 private void setUriPathToDelay(String path) { |
| 30 sUriPathToDelay = path; | 32 sUriPathToDelay = path; |
| 31 } | 33 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 47 || (pathSegments != null && !pathSegments.isEmpty() | 49 || (pathSegments != null && !pathSegments.isEmpty() |
| 48 && TextUtils.equals(pathSegments.get(0), sUriPathToD
elay))) { | 50 && TextUtils.equals(pathSegments.get(0), sUriPathToD
elay))) { |
| 49 Thread.sleep(1000); | 51 Thread.sleep(1000); |
| 50 } | 52 } |
| 51 } catch (InterruptedException e) { | 53 } catch (InterruptedException e) { |
| 52 assert false; | 54 assert false; |
| 53 } | 55 } |
| 54 return super.query(uri, projection, selection, selectionArgs, sortOrder)
; | 56 return super.query(uri, projection, selection, selectionArgs, sortOrder)
; |
| 55 } | 57 } |
| 56 } | 58 } |
| OLD | NEW |