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

Unified Diff: chrome/browser/android/physical_web/physical_web_data_source_android.h

Issue 2561493002: Pass Physical Web metadata through a struct (Closed)
Patch Set: Forward declare MetadataList 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
Index: chrome/browser/android/physical_web/physical_web_data_source_android.h
diff --git a/chrome/browser/android/physical_web/physical_web_data_source_android.h b/chrome/browser/android/physical_web/physical_web_data_source_android.h
index 7704082a58556e9b736b1a1f61eb7cfa46f560cb..9e68b58fa9e65b37ea6210602963f75e9510e89e 100644
--- a/chrome/browser/android/physical_web/physical_web_data_source_android.h
+++ b/chrome/browser/android/physical_web/physical_web_data_source_android.h
@@ -27,7 +27,7 @@ class PhysicalWebCollection {
const base::android::JavaParamRef<jobject>& obj,
const base::android::JavaParamRef<jstring>& j_request_url,
jdouble distance_estimate,
- jint scan_timestamp,
+ jlong scan_timestamp,
const base::android::JavaParamRef<jstring>& j_site_url,
const base::android::JavaParamRef<jstring>& j_icon_url,
const base::android::JavaParamRef<jstring>& j_title,
@@ -36,10 +36,17 @@ class PhysicalWebCollection {
// Returns the metadata list and transfers ownership of the list to the
// caller. Call only once.
- std::unique_ptr<base::ListValue> GetMetadataList();
+ std::unique_ptr<physical_web::MetadataList> GetMetadataList();
+
+ // Returns the metadata list and transfers ownership of the list to the
+ // caller. Call only once.
+ // DEPRECATED
+ // TODO(cco3): Remove when we no longer rely on this.
+ std::unique_ptr<base::ListValue> GetMetadata();
private:
- std::unique_ptr<base::ListValue> metadata_list_;
+ std::unique_ptr<base::ListValue> dictionary_value_list_;
+ std::unique_ptr<physical_web::MetadataList> metadata_list_;
bool accessed_once_;
DISALLOW_COPY_AND_ASSIGN(PhysicalWebCollection);
@@ -59,6 +66,7 @@ class PhysicalWebDataSourceAndroid
void StopDiscovery() override;
std::unique_ptr<base::ListValue> GetMetadata() override;
+ std::unique_ptr<physical_web::MetadataList> GetMetadataList() override;
bool HasUnresolvedDiscoveries() override;
void OnFound(JNIEnv* env,

Powered by Google App Engine
This is Rietveld 408576698