"Great article".Struct is a keyword of structure,We can develop code using
structure.You should want to study the code and algorithm of the computer
science
correctly.https://maketheunitedstatesgreatagain.com/products/trump-usa-45-hat
mattreynolds
https://codereview.chromium.org/2561493002/diff/1/chrome/browser/android/physical_web/physical_web_data_source_android.cc File chrome/browser/android/physical_web/physical_web_data_source_android.cc (right): https://codereview.chromium.org/2561493002/diff/1/chrome/browser/android/physical_web/physical_web_data_source_android.cc#newcode39 chrome/browser/android/physical_web/physical_web_data_source_android.cc:39: auto dictionary_value = new base::DictionaryValue(); This should be: auto ...
https://codereview.chromium.org/2561493002/diff/1/chrome/browser/android/phys...
File chrome/browser/android/physical_web/physical_web_data_source_android.cc
(right):
https://codereview.chromium.org/2561493002/diff/1/chrome/browser/android/phys...
chrome/browser/android/physical_web/physical_web_data_source_android.cc:39: auto
dictionary_value = new base::DictionaryValue();
On 2016/12/07 19:55:31, mattreynolds wrote:
> This should be:
>
> auto dictionary_value = base::MakeUnique<base::DictionaryValue>();
>
> It should do the same thing, but the ListValue::Append method that takes a raw
> pointer is deprecated.
Done.
https://codereview.chromium.org/2561493002/diff/1/chrome/browser/android/phys...
chrome/browser/android/physical_web/physical_web_data_source_android.cc:44:
dictionary_value->SetInteger(physical_web::kScanTimestampKey, scan_timestamp);
On 2016/12/07 10:14:04, vitaliii wrote:
> Probably add a comment that this does not work and do not set this field at
all?
Done.
https://codereview.chromium.org/2561493002/diff/1/chrome/browser/android/phys...
File chrome/browser/android/physical_web/physical_web_data_source_android.h
(right):
https://codereview.chromium.org/2561493002/diff/1/chrome/browser/android/phys...
chrome/browser/android/physical_web/physical_web_data_source_android.h:43: //
TODO(cco3): Remove when we no longer rely on this.
On 2016/12/07 10:14:04, vitaliii wrote:
> nit: explicitly say that this is deprecated and new users must use
> |GetMatadataList| instead.
Done.
https://codereview.chromium.org/2561493002/diff/1/components/omnibox/browser/...
File components/omnibox/browser/physical_web_provider.cc (right):
https://codereview.chromium.org/2561493002/diff/1/components/omnibox/browser/...
components/omnibox/browser/physical_web_provider.cc:76:
ConstructMatches(data_source->GetMetadataListValue().get());
On 2016/12/07 19:55:31, mattreynolds wrote:
> There's another GetMetadata() caller that will need to be switched to
> GetMetadataListValue():
>
> PhysicalWebDOMHandler::HandleRequestNearbyURLs
> //src/ios/chrome/browser/ui/webui/physical_web_ui.cc
Done.
https://codereview.chromium.org/2561493002/diff/1/components/physical_web/dat...
File components/physical_web/data_source/physical_web_data_source.h (left):
https://codereview.chromium.org/2561493002/diff/1/components/physical_web/dat...
components/physical_web/data_source/physical_web_data_source.h:29: class
PhysicalWebDataSource {
On 2016/12/07 19:55:31, mattreynolds wrote:
> Two more PhysicalWebDataSource implementations that need updating:
>
> //src/components/physical_web/data_source/fake_physical_web_data_source.h
> //src/ios/chrome/browser/physical_web/ios_chrome_physical_web_data_source.h
Done.
https://codereview.chromium.org/2561493002/diff/1/components/physical_web/dat...
File components/physical_web/data_source/physical_web_data_source.h (right):
https://codereview.chromium.org/2561493002/diff/1/components/physical_web/dat...
components/physical_web/data_source/physical_web_data_source.h:32: struct
Metadata {
On 2016/12/07 10:14:05, vitaliii wrote:
> Why not commenting each field?
> E.g. guarantees (is everything always set?), units (for distance_estimate),
> format (e.g. for urls), |group_id| I do not understand at all.
>
> In worst case, please at least point where to look in the Java code for all of
> these.
Done.
https://codereview.chromium.org/2561493002/diff/1/components/physical_web/dat...
components/physical_web/data_source/physical_web_data_source.h:38: std::string
icon_url;
On 2016/12/07 10:14:04, vitaliii wrote:
> It would be nice to have these as GURL, but it seems that this will contradict
> with Observer's methods.
Done.
https://codereview.chromium.org/2561493002/diff/1/components/physical_web/dat...
components/physical_web/data_source/physical_web_data_source.h:43: long
scan_timestamp;
On 2016/12/07 10:14:04, vitaliii wrote:
> As far as I know, |long| in Java is 64 bits, but in C++ it is at least 32
bits.
> What about int64_t or even uint64_t? However, going even further, no one is
> going to use raw java timestamp, I believe this will be converted to
base::Time,
> why not doing this here already and have base::Time instead?
Done.
https://codereview.chromium.org/2561493002/diff/1/components/physical_web/dat...
components/physical_web/data_source/physical_web_data_source.h:46: using
MetadataList = std::vector<Metadata>;
On 2016/12/07 10:14:04, vitaliii wrote:
> Nit: This name somewhat collides with |ListValue| usage.
> E.g. |GetMetadataListValue| takes quite some time to parse after one noticed
> |MetadataList|.
I think it's fine to leave it. The confusion will only be temporary.
https://codereview.chromium.org/2561493002/diff/1/components/physical_web/dat...
components/physical_web/data_source/physical_web_data_source.h:71: virtual
std::unique_ptr<base::ListValue> GetMetadataListValue() = 0;
On 2016/12/07 10:14:04, vitaliii wrote:
> Explicitly say that this is deprecated and new users must use |GetMetadata|
> instead.
Done.
mattreynolds
https://codereview.chromium.org/2561493002/diff/20001/components/physical_web/data_source/physical_web_data_source.h File components/physical_web/data_source/physical_web_data_source.h (right): https://codereview.chromium.org/2561493002/diff/20001/components/physical_web/data_source/physical_web_data_source.h#newcode34 components/physical_web/data_source/physical_web_data_source.h:34: struct Metadata { We should comment on which fields ...
https://codereview.chromium.org/2561493002/diff/20001/components/physical_web...
File components/physical_web/data_source/physical_web_data_source.h (right):
https://codereview.chromium.org/2561493002/diff/20001/components/physical_web...
components/physical_web/data_source/physical_web_data_source.h:34: struct
Metadata {
We should comment on which fields are optional. IIRC, at the PWS level the
scanned_url and resolved_url are required, and at least one of title or
description is required. On iOS we only set scanned_url, resolved_url, icon_url,
title, and description.
distance_estimate should probably be optional, maybe we should document it as
returning -1.0 when no distance estimate is available? (what do we do now?)
icon_url is definitely optional, group_id and scan_timestamp should be required
(but currently aren't).
vitaliii
More comments. https://codereview.chromium.org/2561493002/diff/1/components/physical_web/data_source/physical_web_data_source.h File components/physical_web/data_source/physical_web_data_source.h (right): https://codereview.chromium.org/2561493002/diff/1/components/physical_web/data_source/physical_web_data_source.h#newcode46 components/physical_web/data_source/physical_web_data_source.h:46: using MetadataList = std::vector<Metadata>; On 2016/12/08 23:52:50, ...
https://codereview.chromium.org/2561493002/diff/80001/chrome/browser/android/physical_web/physical_web_data_source_android.cc File chrome/browser/android/physical_web/physical_web_data_source_android.cc (right): https://codereview.chromium.org/2561493002/diff/80001/chrome/browser/android/physical_web/physical_web_data_source_android.cc#newcode58 chrome/browser/android/physical_web/physical_web_data_source_android.cc:58: physical_web::Metadata metadata; Do we want to ensure that we ...
lgtm https://codereview.chromium.org/2561493002/diff/140001/chrome/browser/android/physical_web/physical_web_data_source_android_unittest.cc File chrome/browser/android/physical_web/physical_web_data_source_android_unittest.cc (right): https://codereview.chromium.org/2561493002/diff/140001/chrome/browser/android/physical_web/physical_web_data_source_android_unittest.cc#newcode100 chrome/browser/android/physical_web/physical_web_data_source_android_unittest.cc:100: (jlong) kScanTimestamp, some more here
ios lgtm. I'm not an owner though, so cc'ing eugenebut@
nyquist
https://codereview.chromium.org/2561493002/diff/160001/chrome/browser/android/physical_web/physical_web_data_source_android_unittest.cc File chrome/browser/android/physical_web/physical_web_data_source_android_unittest.cc (right): https://codereview.chromium.org/2561493002/diff/160001/chrome/browser/android/physical_web/physical_web_data_source_android_unittest.cc#newcode36 chrome/browser/android/physical_web/physical_web_data_source_android_unittest.cc:36: PhysicalWebCollection* collection(); Naming for C++ starts with uppercase. See ...
3 years, 11 months ago
(2017-01-05 07:42:28 UTC)
#27
The patchset sent to the CQ was uploaded after l-g-t-m from vitaliii@chromium.org, mattreynolds@chromium.org, jyquinn@chromium.org, nyquist@chromium.org ...
3 years, 11 months ago
(2017-01-11 19:25:10 UTC)
#32
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/134060) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 11 months ago
(2017-01-11 19:34:52 UTC)
#35
The patchset sent to the CQ was uploaded after l-g-t-m from jyquinn@chromium.org, vitaliii@chromium.org, nyquist@chromium.org, olivierrobin@chromium.org, ...
3 years, 11 months ago
(2017-01-12 23:50:46 UTC)
#50
CQ is committing da patch. Bot data: {"patchset_id": 310001, "attempt_start_ts": 1484265045418680, "parent_rev": "c4bfb0e6139a447f0b4eeb31d34064b7ebf0fdcc", "commit_rev": "4417ce64c063776af45d1d897f15cdc0be361a2e"}
3 years, 11 months ago
(2017-01-13 01:09:40 UTC)
#52
CQ is committing da patch.
Bot data: {"patchset_id": 310001, "attempt_start_ts": 1484265045418680,
"parent_rev": "c4bfb0e6139a447f0b4eeb31d34064b7ebf0fdcc", "commit_rev":
"4417ce64c063776af45d1d897f15cdc0be361a2e"}
commit-bot: I haz the power
Description was changed from ========== Pass Physical Web metadata through a struct Currently, we use ...
3 years, 11 months ago
(2017-01-13 01:10:28 UTC)
#53
Message was sent while issue was closed.
Description was changed from
==========
Pass Physical Web metadata through a struct
Currently, we use DictionaryValues in the Physical Web data source.
The problem with this is that we cannot store store longs (timestamps).
This change introduces a metadata struct that can be requested from the
data source, deprecating the DictionaryValue option.
BUG=667722
==========
to
==========
Pass Physical Web metadata through a struct
Currently, we use DictionaryValues in the Physical Web data source.
The problem with this is that we cannot store store longs (timestamps).
This change introduces a metadata struct that can be requested from the
data source, deprecating the DictionaryValue option.
BUG=667722
Review-Url: https://codereview.chromium.org/2561493002
Cr-Commit-Position: refs/heads/master@{#443425}
Committed:
https://chromium.googlesource.com/chromium/src/+/4417ce64c063776af45d1d897f15...
==========
commit-bot: I haz the power
Committed patchset #17 (id:310001) as https://chromium.googlesource.com/chromium/src/+/4417ce64c063776af45d1d897f15cdc0be361a2e
3 years, 11 months ago
(2017-01-13 01:10:30 UTC)
#54
Issue 2561493002: Pass Physical Web metadata through a struct
(Closed)
Created 4 years ago by cco3
Modified 3 years, 11 months ago
Reviewers: mattreynolds, Marc Treib, vitaliii, nyquist, Jackie Quinn, Eugene But (OOO till 7-30), Olivier, rohitrao (ping after 24h)
Base URL:
Comments: 77