-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support new protobuf format used in newer versions of chrome
- Loading branch information
Showing
33 changed files
with
8,931 additions
and
3,773 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Learn more: https://docs.buf.build/configuration/v1/buf-gen-yaml | ||
version: v1 | ||
plugins: | ||
- plugin: es | ||
path: ./node_modules/.bin/protoc-gen-es | ||
opt: target=ts | ||
out: src/gen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import * as process from 'process'; | ||
import otelSDK from './tracing'; | ||
otelSDK.start(); | ||
|
||
import start from './start'; | ||
start(otelSDK); | ||
|
||
|
||
export { default as app, default } from './app'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Copyright 2022 The Chromium Authors | ||
# 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") | ||
|
||
if (is_android) { | ||
import("//build/config/android/rules.gni") | ||
} | ||
|
||
_proto_files = [ | ||
"action_info.proto", | ||
"chrome_searchbox_stats.proto", | ||
"entity_info.proto", | ||
"groups.proto", | ||
"types.proto", | ||
] | ||
|
||
proto_library("omnibox_proto") { | ||
sources = _proto_files | ||
proto_in_dir = "." | ||
} | ||
|
||
if (is_android) { | ||
proto_java_library("omnibox_proto_java") { | ||
proto_path = "." | ||
sources = _proto_files | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
monorail: { | ||
component: "UI>Browser>Omnibox" | ||
} | ||
team_email: "[email protected]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright 2022 The Chromium Authors | ||
// | ||
// Redistribution and use in source and binary forms, with or without | ||
// modification, are permitted provided that the following conditions are | ||
// met: | ||
// | ||
// * Redistributions of source code must retain the above copyright | ||
// notice, this list of conditions and the following disclaimer. | ||
// * Redistributions in binary form must reproduce the above | ||
// copyright notice, this list of conditions and the following disclaimer | ||
// in the documentation and/or other materials provided with the | ||
// distribution. | ||
// * Neither the name of Google Inc. nor the names of its | ||
// contributors may be used to endorse or promote products derived from | ||
// this software without specific prior written permission. | ||
// | ||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
file://components/omnibox/OWNERS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Name: Omnibox Protos | ||
Short Name: omnibox_proto | ||
URL: This is the canonical public repository | ||
Version: 539203338 | ||
Date: 2023/06/09 UTC | ||
License: BSD | ||
License File: LICENSE | ||
Security Critical: Yes | ||
Shipped: yes | ||
|
||
Description: | ||
This package contains the protos that are used by the Omnibox team to facilitate | ||
integration between Chrome and Google Search. | ||
Updates to this code should be made by changing the internal copies, and then | ||
running the export script. | ||
|
||
blaze run //chrome/omnibox/tools/proto_export -- \ | ||
--from_piper \ | ||
--output=$CHROMIUM_SRC/third_party/omnibox_proto | ||
|
||
Local Modifications: | ||
Unchanged from the output of the export script. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
syntax = 'proto2'; | ||
|
||
option go_package = "github.com/AskAlice/chrome-suggest/proto/action_info"; | ||
package omnibox; | ||
|
||
// Entity Suggestion Action type received in the server response and echoed back | ||
// as part of the searchboxstats. The values are not used in Chrome in any way | ||
// and thus do not need names or comments that describe what they represent. | ||
enum ActionType { | ||
UNKNOWN_ACTION_TYPE = 0; | ||
ACTION_PHONE_CALL = 1; | ||
ACTION_TEXT = 2; | ||
ACTION_EMAIL = 3; | ||
ACTION_CALL = 4; | ||
ACTION_CHAT = 5; | ||
ACTION_VIDEO_CALL = 6; | ||
ACTION_NAVIGATE = 7; | ||
ACTION_SEARCH = 8; | ||
ACTION_WEBPAGE = 9; | ||
ACTION_OSRP = 10; | ||
ACTION_SM = 11; | ||
ACTION_AOG = 12; | ||
} | ||
|
||
message ActionInfo { | ||
optional ActionType logs_action_type = 1; | ||
optional string package_id = 2; | ||
optional string action_uri = 4; | ||
optional uint32 action_type = 6; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
syntax = 'proto2'; | ||
|
||
option go_package = "github.com/AskAlice/chrome-suggest/proto/entity_info"; | ||
|
||
message EntityInfo { | ||
// The entity id. | ||
optional string entity_id = 1; | ||
|
||
// The suggestion second line (subtitle). | ||
// For some clients (e.g. desktop) this is used as the part which is to the | ||
// right of the emdash. | ||
optional string annotation = 2; | ||
|
||
// Image Url. | ||
// Will replace the suggestion icon | ||
optional string image_url = 6; | ||
|
||
// Will replace the original suggestion as the text on the suggestion's 1st | ||
// line (title). | ||
optional string name = 7; | ||
|
||
// Dominant color. | ||
// Affects how image is rendered. | ||
optional string dominant_color = 9; | ||
|
||
// Encoding of how search behavior should be modified when clicking the entity | ||
// suggestion (gs_ssp). | ||
optional string suggest_search_parameters = 10; | ||
|
||
// List of possible actions for this entity. | ||
repeated ActionInfo action_suggestions = 12; | ||
|
||
// List of categories this entity belongs to. | ||
repeated CategoryInfo.Category category = 14; | ||
|
||
// The entity's official website uri. | ||
optional string website_uri = 17; | ||
} | ||
|
||
// Entity Suggestion Action descriptor. | ||
message ActionInfo { | ||
enum ActionType { | ||
DIRECTIONS = 2; | ||
CALL = 3; | ||
REVIEWS = 20; | ||
} | ||
|
||
// The URI to open when the action is invoked. | ||
optional string action_uri = 3; | ||
|
||
// // Action type for logging. | ||
// optional ActionType logs_action_type = 4; | ||
|
||
// Action type. | ||
optional ActionType action_type = 8; | ||
|
||
// If non-empty, the action must result in navigation to the SRP accompanied | ||
// with these additional request parameters to help force a certain SRP. | ||
map<string, string> search_parameters = 9; | ||
} | ||
|
||
// Entity Suggestion Category info. | ||
message CategoryInfo { | ||
enum Category { | ||
UNKNOWN = 0; | ||
MUSIC = 2; | ||
GAMES = 4; | ||
PEOPLE = 6; | ||
SPORTS = 7; | ||
BOOKS = 9; | ||
GEO = 12; | ||
NATURAL_WORLD = 13; | ||
FOOD = 15; | ||
PRODUCTS = 16; | ||
UNIVERSITIES = 17; | ||
CARS_US = 18; | ||
TV = 19; | ||
MOVIES = 20; | ||
CARS_MODEL_US = 21; | ||
LOCAL_POIS_AND_CHAINS = 22; | ||
COMPANIES = 23; | ||
PRODUCT_LINES = 24; | ||
LOCAL_POI = 25; | ||
LOCALITY = 26; | ||
} | ||
} |
Oops, something went wrong.