Commit 21c9da9a authored by Justin DeWitt's avatar Justin DeWitt Committed by Commit Bot

[Explore Sites] Adds the catalog proto.

This is used on the wire from the Explore Sites API to Chrome.

Bug: 867488
Change-Id: Id830f53b7ea7cfad8fbd6c7e38694d2de43ff558
Reviewed-on: https://chromium-review.googlesource.com/1210945Reviewed-by: default avatarCathy Li <chili@chromium.org>
Commit-Queue: Justin DeWitt <dewittj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589535}
parent 5bd4556c
......@@ -2474,6 +2474,7 @@ jumbo_split_static_library("browser") {
deps += [
":client_discourse_context_proto",
":delta_file_proto",
":explore_sites_proto",
":jni_headers",
"//chrome/browser/android/webapk:proto",
"//chrome/services/media_gallery_util:manifest", # TODO(xingliu): Tries to remove this.
......@@ -4744,6 +4745,12 @@ if (is_android) {
"android/proto/delta_file.proto",
]
}
proto_library("explore_sites_proto") {
sources = [
"android/explore_sites/catalog.proto",
]
}
}
if (is_win) {
......
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
syntax = "proto3";
package explore_sites;
option optimize_for = LITE_RUNTIME;
// Represents the entire Explore Sites catalog, containing multiple categories
// each with a list of sites.
message Catalog {
// List of categories in priority order. The first N will be shown directly
// on the NTP.
repeated Category categories = 1;
}
// A logical grouping of sites, with a title and an icon.
message Category {
// The canonical types of category.
enum CategoryType {
DEFAULT = 0;
SOCIAL = 1;
ENTERTAINMENT = 2;
SPORT = 3;
NEWS = 4;
SHOPPING = 5;
REFERENCE = 6;
BANKING = 7;
GOVERNMENT = 8;
TRAVEL = 9;
EDUCATION = 10;
JOBS = 11;
APPS_GAMES = 12;
FAVORITE = 13;
GOOGLE = 14;
FOOD = 15;
HEALTH = 16;
BOOKS = 17;
TECHNOLOGY = 18;
SCIENCE = 19;
}
// Used to identify the category and as a hash tag within the Explore Sites
// page to scroll directly to this category.
CategoryType type = 1;
// Displayed beneath each title icon on the NTP as well as on the Explore
// Sites page. Localized to the primary language specified in the
// GetCatalogRequest.
string localized_title = 2;
// The icon that represents this category's sites.
// Binary encoding: WebP
// |icon| may be omitted for certain API requests.
bytes icon = 3;
// List of sites within the category in priority order.
// |sites| may be omitted for certain API requests.
repeated Site sites = 4;
}
// A single site that can be clicked on and navigated to from the Explore Sites
// page.
message Site {
// The url of the site that will be shown on click.
string site_url = 1;
// The icon of the site that can be displayed on the Explore Sites page.
// Binary encoding: WebP
bytes icon = 2;
// The title of the page that will be displayed near the page icon. This title
// will be in the language presented by the site, not localized to the user's
// language preferences.
string title = 3;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment