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

Unified Diff: chrome/browser/resources/history/history.js

Issue 1654703002: Revert of MD History: Add basic material design history cards and history items (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/resources/history/history.js
diff --git a/chrome/browser/resources/history/history.js b/chrome/browser/resources/history/history.js
index 6429683e0abd53abbdeb83bb7c384e7031eb5f60..3ea486d1f9acf527550d3a3c5a61a9d224952454 100644
--- a/chrome/browser/resources/history/history.js
+++ b/chrome/browser/resources/history/history.js
@@ -46,6 +46,39 @@
};
/**
+ * The type of the history result object. The definition is based on
+ * chrome/browser/ui/webui/history_ui.cc:
+ * BrowsingHistoryHandler::HistoryEntry::ToValue()
+ * @typedef {{allTimestamps: Array<number>,
+ * blockedVisit: (boolean|undefined),
+ * dateRelativeDay: (string|undefined),
+ * dateShort: string,
+ * dateTimeOfDay: (string|undefined),
+ * deviceName: string,
+ * deviceType: string,
+ * domain: string,
+ * hostFilteringBehavior: (number|undefined),
+ * snippet: (string|undefined),
+ * starred: boolean,
+ * time: number,
+ * title: string,
+ * url: string}}
+ */
+var HistoryEntry;
+
+/**
+ * The type of the history results info object. The definition is based on
+ * chrome/browser/ui/webui/history_ui.cc:
+ * BrowsingHistoryHandler::QueryComplete()
+ * @typedef {{finished: boolean,
+ * hasSyncedResults: (boolean|undefined),
+ * queryEndTime: string,
+ * queryStartTime: string,
+ * term: string}}
+ */
+var HistoryQuery;
+
+/**
* Returns true if the mobile (non-desktop) version is being shown.
* @return {boolean} true if the mobile version is being shown.
*/
@@ -111,19 +144,19 @@
// See comment in BrowsingHistoryHandler::QueryComplete - we won't always
// get all of these.
- this.dateRelativeDay = result.dateRelativeDay;
- this.dateTimeOfDay = result.dateTimeOfDay;
- this.dateShort = result.dateShort;
+ this.dateRelativeDay = result.dateRelativeDay || '';
+ this.dateTimeOfDay = result.dateTimeOfDay || '';
+ this.dateShort = result.dateShort || '';
// Shows the filtering behavior for that host (only used for supervised
// users).
// A value of |SupervisedUserFilteringBehavior.ALLOW| is not displayed so it
// is used as the default value.
this.hostFilteringBehavior = SupervisedUserFilteringBehavior.ALLOW;
- if (result.hostFilteringBehavior)
+ if (typeof result.hostFilteringBehavior != 'undefined')
this.hostFilteringBehavior = result.hostFilteringBehavior;
- this.blockedVisit = result.blockedVisit;
+ this.blockedVisit = result.blockedVisit || false;
// Whether this is the continuation of a previous day.
this.continued = continued;
« no previous file with comments | « chrome/browser/resources/history/externs.js ('k') | chrome/browser/resources/md_history/compiled_resources.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698