| 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 471053d0f00ebb5e2433ac3e0bb2b158a523f2f8..b1154ceb7fe7c429fdbc60cd003f62fc899a03ac 100644
|
| --- a/chrome/browser/android/ntp/ntp_snippets_bridge.cc
|
| +++ b/chrome/browser/android/ntp/ntp_snippets_bridge.cc
|
| @@ -13,6 +13,7 @@
|
| #include "chrome/browser/ntp_snippets/ntp_snippets_service_factory.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| #include "chrome/browser/profiles/profile_android.h"
|
| +#include "chrome/browser/profiles/profile_manager.h"
|
| #include "components/ntp_snippets/ntp_snippet.h"
|
| #include "components/ntp_snippets/ntp_snippets_service.h"
|
| #include "jni/SnippetsBridge_jni.h"
|
| @@ -29,6 +30,12 @@ static jlong Init(JNIEnv* env,
|
| return reinterpret_cast<intptr_t>(snippets_bridge);
|
| }
|
|
|
| +static void FetchSnippets(JNIEnv* env,
|
| + const JavaParamRef<jclass>& caller) {
|
| + Profile* profile = ProfileManager::GetLastUsedProfile();
|
| + NTPSnippetsServiceFactory::GetForProfile(profile)->FetchSnippets();
|
| +}
|
| +
|
| NTPSnippetsBridge::NTPSnippetsBridge(JNIEnv* env,
|
| const JavaParamRef<jobject>& j_profile)
|
| : snippet_service_observer_(this) {
|
|
|