| 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 e217965b77e2c1fad66b232c7b8fa013c6235d39..ad10f01d7d773fa56fa5edea71ed159b7e5ead91 100644
|
| --- a/chrome/browser/android/ntp/ntp_snippets_bridge.cc
|
| +++ b/chrome/browser/android/ntp/ntp_snippets_bridge.cc
|
| @@ -148,6 +148,13 @@ ScopedJavaLocalRef<jobject> NTPSnippetsBridge::GetSuggestionsForCategory(
|
| JNIEnv* env,
|
| const base::android::JavaParamRef<jobject>& obj,
|
| jint category) {
|
| + // Get layout for the category.
|
| + base::Optional<CategoryInfo> info =
|
| + content_suggestions_service_->GetCategoryInfo(
|
| + content_suggestions_service_->category_factory()->FromIDValue(
|
| + category));
|
| + DCHECK(info);
|
| +
|
| const std::vector<ContentSuggestion>& suggestions =
|
| content_suggestions_service_->GetSuggestionsForCategory(
|
| content_suggestions_service_->category_factory()->FromIDValue(
|
| @@ -162,7 +169,8 @@ ScopedJavaLocalRef<jobject> NTPSnippetsBridge::GetSuggestionsForCategory(
|
| ConvertUTF16ToJavaString(env, suggestion.snippet_text()).obj(),
|
| ConvertUTF8ToJavaString(env, suggestion.url().spec()).obj(),
|
| ConvertUTF8ToJavaString(env, suggestion.amp_url().spec()).obj(),
|
| - suggestion.publish_date().ToJavaTime(), suggestion.score());
|
| + suggestion.publish_date().ToJavaTime(), suggestion.score(),
|
| + static_cast<int>(info->card_layout()));
|
| }
|
| return result;
|
| }
|
|
|