| 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.offlinepages; | 5 package org.chromium.chrome.browser.offlinepages; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 import android.os.Bundle; | 8 import android.os.Bundle; |
| 9 | 9 |
| 10 import org.chromium.base.ApplicationStatus; | 10 import org.chromium.base.ApplicationStatus; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 */ | 93 */ |
| 94 @Override | 94 @Override |
| 95 public void onResult(Boolean result) { | 95 public void onResult(Boolean result) { |
| 96 // Release the wake lock. | 96 // Release the wake lock. |
| 97 Log.d(TAG, "onProcessingDone"); | 97 Log.d(TAG, "onProcessingDone"); |
| 98 waiter.onWaitDone(); | 98 waiter.onWaitDone(); |
| 99 } | 99 } |
| 100 }; | 100 }; |
| 101 | 101 |
| 102 // Pass the activation on to the bridge to the C++ RequestCoordinator. | 102 // Pass the activation on to the bridge to the C++ RequestCoordinator. |
| 103 mBridge.startProcessing(deviceConditions, callback); | 103 if (!mBridge.startProcessing(deviceConditions, callback)) { |
| 104 // Processing not started currently. Let callback know. |
| 105 callback.onResult(false); |
| 106 } |
| 104 } | 107 } |
| 105 } | 108 } |
| OLD | NEW |