Chromium Code Reviews| Index: chrome/browser/android/ntp/ntp_snippets_bridge.cc |
| diff --git a/chrome/browser/android/ntp/ntp_snippets_bridge.cc b/chrome/browser/android/ntp/ntp_snippets_bridge.cc |
| index 9e7a1717a423045b086f85130b03b627df9030ba..9f23b2d0fbea253d630fc38b0ac5976854caf286 100644 |
| --- a/chrome/browser/android/ntp/ntp_snippets_bridge.cc |
| +++ b/chrome/browser/android/ntp/ntp_snippets_bridge.cc |
| @@ -168,6 +168,13 @@ void NTPSnippetsBridge::NTPSnippetsServiceShutdown() { |
| snippet_service_observer_.Remove(ntp_snippets_service_); |
| } |
| +void NTPSnippetsBridge::NTPSnippetsServiceCleared() { |
| + // The user signed out or disabled sync. Since snippets rely on those, we |
|
Bernhard Bauer
2016/05/17 12:24:39
Nit: double "we".
dgn
2016/05/17 13:18:22
Done.
|
| + // we clear them to be consistent with the initially signed out state. |
| + JNIEnv* env = base::android::AttachCurrentThread(); |
| + Java_SnippetsBridge_onSnippetsCleared(env, observer_.obj()); |
| +} |
| + |
| void NTPSnippetsBridge::OnImageFetched(ScopedJavaGlobalRef<jobject> callback, |
| const std::string& snippet_id, |
| const SkBitmap* bitmap) { |