| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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.autofill; | 5 package org.chromium.chrome.browser.autofill; |
| 6 | 6 |
| 7 import org.chromium.base.ThreadUtils; | 7 import org.chromium.base.ThreadUtils; |
| 8 import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; | 8 import org.chromium.chrome.browser.autofill.PersonalDataManager.AutofillProfile; |
| 9 import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; | 9 import org.chromium.chrome.browser.autofill.PersonalDataManager.CreditCard; |
| 10 import org.chromium.chrome.browser.autofill.PersonalDataManager.PersonalDataMana
gerObserver; | 10 import org.chromium.chrome.browser.autofill.PersonalDataManager.PersonalDataMana
gerObserver; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 String guid = ThreadUtils.runOnUiThreadBlocking(new Callable<String>() { | 67 String guid = ThreadUtils.runOnUiThreadBlocking(new Callable<String>() { |
| 68 @Override | 68 @Override |
| 69 public String call() { | 69 public String call() { |
| 70 return PersonalDataManager.getInstance().setProfile(profile); | 70 return PersonalDataManager.getInstance().setProfile(profile); |
| 71 } | 71 } |
| 72 }); | 72 }); |
| 73 mOnPersonalDataChangedHelper.waitForCallback(callCount); | 73 mOnPersonalDataChangedHelper.waitForCallback(callCount); |
| 74 return guid; | 74 return guid; |
| 75 } | 75 } |
| 76 | 76 |
| 77 void deleteProfile(final String guid) throws InterruptedException, TimeoutEx
ception { | 77 public void deleteProfile(final String guid) throws InterruptedException, Ti
meoutException { |
| 78 int callCount = mOnPersonalDataChangedHelper.getCallCount(); | 78 int callCount = mOnPersonalDataChangedHelper.getCallCount(); |
| 79 ThreadUtils.runOnUiThreadBlocking(new Runnable() { | 79 ThreadUtils.runOnUiThreadBlocking(new Runnable() { |
| 80 @Override | 80 @Override |
| 81 public void run() { | 81 public void run() { |
| 82 PersonalDataManager.getInstance().deleteProfile(guid); | 82 PersonalDataManager.getInstance().deleteProfile(guid); |
| 83 } | 83 } |
| 84 }); | 84 }); |
| 85 mOnPersonalDataChangedHelper.waitForCallback(callCount); | 85 mOnPersonalDataChangedHelper.waitForCallback(callCount); |
| 86 } | 86 } |
| 87 | 87 |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 @Override | 333 @Override |
| 334 public void onPersonalDataChanged() { | 334 public void onPersonalDataChanged() { |
| 335 mOnPersonalDataChangedHelper.notifyCalled(); | 335 mOnPersonalDataChangedHelper.notifyCalled(); |
| 336 } | 336 } |
| 337 } | 337 } |
| 338 ); | 338 ); |
| 339 } | 339 } |
| 340 }); | 340 }); |
| 341 } | 341 } |
| 342 } | 342 } |
| OLD | NEW |