Chromium Code Reviews| Index: sync/protocol/favicon_specifics.proto |
| diff --git a/sync/protocol/favicon_specifics.proto b/sync/protocol/favicon_specifics.proto |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..7e018105e9b4ef5f7f27a26435245b4ebc612f2b |
| --- /dev/null |
| +++ b/sync/protocol/favicon_specifics.proto |
| @@ -0,0 +1,46 @@ |
| +// Copyright (c) 2012 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. |
| +// |
| +// Sync protocol datatype extension for the favicons. |
| + |
| +syntax = "proto2"; |
| + |
| +option optimize_for = LITE_RUNTIME; |
| +option retain_unknown_fields = true; |
| + |
| +package sync_pb; |
| + |
| +message FaviconData { |
| + optional bytes favicon = 1; |
| + // The favicon image's type. This should be kept in sync with IconType in |
| + // history_types.cc |
|
pkotwicz
2013/02/07 02:15:47
Nit: history_types.h
|
| + enum IconType { |
| + // A normal web favicon (max resolution 32x32). |
| + FAVICON = 0; |
| + // A high resolution touch favicon (max resolution 128x128) |
| + TOUCH_ICON = 1; |
| + // A precomposed touch favicon (max resolution xxx). |
|
pkotwicz
2013/02/07 02:15:47
It makes sense to cap the size of both TOUCH_ICON
|
| + TOUCH_PRECOMPOSED_ICON = 2; |
| + } |
| + optional IconType icon_type = 2; |
| + // The width in pixels of this favicon (which is assumed to be the same as |
| + // the height). |
| + optional int64 width = 3; |
|
pkotwicz
2013/02/07 02:15:47
We should sync both the width and height.
I think
|
| +} |
| + |
| +// Properties of Favicon objects. |
| +message FaviconSpecifics { |
| + // The url of the favicon image. |
| + optional string favicon_source = 1; |
|
pkotwicz
2013/02/07 02:15:47
Nit: Name this parameter |favicon_url| / |icon_url
|
| + // The favicons associated with this source. Only one favicon per IconType |
| + // is supported. |
| + repeated FaviconData favicons = 2; |
| + // The last time a page using this favicon was visited (in milliseconds |
| + // since linux epoch). Once a favicon has not been visited in long enough |
| + // time, it is garbage collected. |
| + optional int64 last_visit_time_ms = 3; |
| + // Whether this favicon is currently bookmarked or not. Bookmarked favicons |
| + // are not garbage collected. |
| + optional bool is_bookmarked = 4; |
| +} |