| Index: chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java b/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java
|
| index 44c6f0b27b66abb3bb2d6765aeb29dbd358d9446..bcf3b5ee27ba8f398e55ea6d01fc2e48026b875b 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/ntp/snippets/SnippetsBridge.java
|
| @@ -65,19 +65,18 @@
|
| }
|
|
|
| /**
|
| - * Sets the recipient for the fetched snippets.
|
| + * Sets the recipient for the fetched snippets. This method should be called only once.
|
| *
|
| - * An observer needs to be set before the native code attempts to transmit snippets them to
|
| - * java. Upon registration, the observer will be notified of already fetched snippets.
|
| + * Before the observer is set, the native code will not attempt to transmit them to java. Upon
|
| + * registration, the observer will be notified of already fetched snippets.
|
| *
|
| - * @param observer object to notify when snippets are received, or {@code null} if we want to
|
| - * stop observing.
|
| + * @param observer object to notify when snippets are received.
|
| */
|
| public void setObserver(SnippetsObserver observer) {
|
| - assert mObserver == null || mObserver == observer;
|
| + assert mObserver == null;
|
|
|
| mObserver = observer;
|
| - nativeSetObserver(mNativeSnippetsBridge, observer == null ? null : this);
|
| + nativeSetObserver(mNativeSnippetsBridge, this);
|
| }
|
|
|
| @CalledByNative
|
|
|