Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(375)

Unified Diff: components/physical_web/data_source/fake_physical_web_data_source.cc

Issue 2640773002: [NTP::PhysicalWeb] Filter our pages with same group_id. (Closed)
Patch Set: treib@ nits. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/physical_web/data_source/fake_physical_web_data_source.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/physical_web/data_source/fake_physical_web_data_source.cc
diff --git a/components/physical_web/data_source/fake_physical_web_data_source.cc b/components/physical_web/data_source/fake_physical_web_data_source.cc
index d5ebbb11f662b6ad694435ad2fcf60d1eef1afbc..70fea374e5dcefd139108fccad65dba4e0ced408 100644
--- a/components/physical_web/data_source/fake_physical_web_data_source.cc
+++ b/components/physical_web/data_source/fake_physical_web_data_source.cc
@@ -17,6 +17,7 @@ namespace physical_web {
std::unique_ptr<DictionaryValue> CreatePhysicalWebPage(
const std::string& resolved_url,
double distance_estimate,
+ const std::string& group_id,
int scan_timestamp,
const std::string& title,
const std::string& description,
@@ -24,6 +25,7 @@ std::unique_ptr<DictionaryValue> CreatePhysicalWebPage(
auto page = base::MakeUnique<DictionaryValue>();
page->SetString(kScannedUrlKey, scanned_url);
page->SetDouble(kDistanceEstimateKey, distance_estimate);
+ page->SetString(kGroupIdKey, group_id);
// TODO(crbug.com/667722): Remove this integer workaround once timestamp is
// fixed.
page->SetInteger(kScanTimestampKey, scan_timestamp);
@@ -38,8 +40,8 @@ std::unique_ptr<DictionaryValue> CreateDummyPhysicalWebPage(int id,
int timestamp) {
const std::string id_string = base::IntToString(id);
return CreatePhysicalWebPage("https://resolved_url.com/" + id_string,
- distance, timestamp, "title " + id_string,
- "description " + id_string,
+ distance, /*group_id=*/std::string(), timestamp,
+ "title " + id_string, "description " + id_string,
"https://scanned_url.com/" + id_string);
}
« no previous file with comments | « components/physical_web/data_source/fake_physical_web_data_source.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698