Commit 8d26b9ac authored by Gustavo Avena's avatar Gustavo Avena Committed by Commit Bot

Copy message protos for the new Kids Chrome Management API.

BUG=973822

Change-Id: I71f6494eae094646068382444eb985626efd0bbe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1658168
Commit-Queue: Gustavo Avena <gustavoavena@chromium.org>
Reviewed-by: default avatarHenrique Grandinetti <hgrandinetti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#672117}
parent fa0a6456
...@@ -4918,7 +4918,10 @@ jumbo_split_static_library("browser") { ...@@ -4918,7 +4918,10 @@ jumbo_split_static_library("browser") {
"supervised_user/supervised_user_whitelist_service.h", "supervised_user/supervised_user_whitelist_service.h",
"supervised_user/supervised_users.h", "supervised_user/supervised_users.h",
] ]
deps += [ "//chrome/common:supervised_user_commands_mojom" ] deps += [
"//chrome/browser/supervised_user/kids_chrome_management:proto",
"//chrome/common:supervised_user_commands_mojom",
]
} }
if (enable_supervised_users && !is_android) { if (enable_supervised_users && !is_android) {
sources += [ sources += [
......
# Copyright 2019 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.
import("//third_party/protobuf/proto_library.gni")
proto_library("proto") {
sources = [
"families_common.proto",
"kidschromemanagement_messages.proto",
]
}
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
package kids_chrome_management;
// Basic user profile information.
message UserProfile {
// Obfuscated Gaia ID of the member. Required.
optional string obfuscated_user_id = 1;
// Primary email address of the user. Required.
optional string email = 2;
// The user's full name, synthesized with structured and unstructured name
// fields informed by the user. Optional.
optional string display_name = 3;
// Portrait photo of the user. Optional.
optional string profile_image_url = 4;
// Default profile image to use if profile_image_url is not set. Required.
optional string default_profile_image_url = 5;
// Next id: 6
}
// The role a user has within a family.
// Details on which actions are tied to those roles.
enum FamilyRole {
UNKNOWN_FAMILY_ROLE = 0;
// The (only) head of household of the family.
HEAD_OF_HOUSEHOLD = 1;
// A parent in the family.
PARENT = 2;
// A member of the family. Can be an overage child or any other member
// without approval rights.
MEMBER = 3;
// An underage child in the family. The user always has a Unicorn account.
CHILD = 4;
// An unconfirmed member of the family who has been directly added to the
// family.
UNCONFIRMED_MEMBER = 5;
// next ID: 6
}
// Data about a family member.
message FamilyMember {
// The user's role in the family. Required.
optional FamilyRole role = 1;
// Profile of the family member. Required.
optional UserProfile profile = 2;
}
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
package kids_chrome_management;
import "families_common.proto";
message ListFamilyMembersRequest {
// Must always be "mine" (enforced by the API config). Required.
optional string family_id = 1;
// Next id: 2
}
message ListFamilyMembersResponse {
// Obfuscated Gaia ID of the calling user. Required.
optional string self_obfuscated_gaia_id = 1;
// List of family members from the family requested. Required.
// Contains at least the Head of Household.
// Throws an exception and fails if the user is not in any family.
repeated FamilyMember members = 2;
// Next id: 3
}
message RequestRestrictedUrlAccessRequest {
// Must be "me". Required.
optional string person_id = 1;
// URL of the restricted website to which the access is requested. Required.
// URL scheme must be https, http or ftp.
optional string url = 2;
// Next id: 3
}
message RequestRestrictedUrlAccessResponse {
// Next id: 1
}
message ClassifyUrlRequest {
// Must be "me". Required.
optional string person_id = 1;
// The URL to be classified. Required.
optional string url = 2;
// Region_code is a 2-letter ISO 3166-1 code. Required.
// When set, uses specific logic to classify URLs for that region.
optional string region_code = 3;
}
message ClassifyUrlResponse {
enum DisplayClassification {
UNKNOWN_DISPLAY_CLASSIFICATION = 0;
// Allow url to be displayed
ALLOWED = 1;
// Block url and allow kid to request parent for permission
RESTRICTED = 2;
}
// URL classification. Required.
optional DisplayClassification display_classification = 1;
// Next id: 2
}
\ No newline at end of file
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