{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/43269431","id":43269431,"diff_hunk":"@@ -0,0 +1,267 @@\n+/* globals BrowserDB, SyncBrowserDB, SyncManagerBridge */\n+'use strict';\n+\n+(function(exports){\n+\n+  const INITIAL_HISTORY_COUNT = 21;\n+\n+  const DAY_IN_MILLI_SECOND = 86400000;\n+\n+  // TODO: for the live time history data loading task.\n+  var HistoryStore = {\n+    isSynced: false,\n+\n+    isMoreData: false,\n+\n+    cache: new Map(),\n+\n+    cacheIndexStartAt: 0,\n+\n+    cacheIndexEndAt: 0,\n+\n+    lastDataIndex: undefined,\n+\n+    currentFolder : undefined,\n+\n+    reset: function (cb) {\n+      return new Promise(resolve => {\n+        this.isMoreDat = false;\n+        this.cache.clear();\n+        this.cacheIndexStartAt = 0;\n+        this.cacheIndexEndAt = 0;\n+        this.lastDataIndex = undefined;\n+        this.currentFolder = undefined;","path":"tv_apps/browser/js/historyStore.js","position":33,"original_position":33,"commit_id":"c7f8916fd98193b57d13090741db4d6c141a217a","original_commit_id":"c7f8916fd98193b57d13090741db4d6c141a217a","user":{"login":"begeeben","id":2361829,"avatar_url":"https://avatars.githubusercontent.com/u/2361829?v=3","gravatar_id":"","url":"https://api.github.com/users/begeeben","html_url":"https://github.com/begeeben","followers_url":"https://api.github.com/users/begeeben/followers","following_url":"https://api.github.com/users/begeeben/following{/other_user}","gists_url":"https://api.github.com/users/begeeben/gists{/gist_id}","starred_url":"https://api.github.com/users/begeeben/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/begeeben/subscriptions","organizations_url":"https://api.github.com/users/begeeben/orgs","repos_url":"https://api.github.com/users/begeeben/repos","events_url":"https://api.github.com/users/begeeben/events{/privacy}","received_events_url":"https://api.github.com/users/begeeben/received_events","type":"User","site_admin":false},"body":"Please change these to ```null```.","created_at":"2015-10-28T15:18:48Z","updated_at":"2015-10-28T15:18:48Z","html_url":"https://github.com/mozilla-b2g/gaia/pull/32796#discussion_r43269431","pull_request_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32796","_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/43269431"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/32796#discussion_r43269431"},"pull_request":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32796"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32796","id":48968115,"html_url":"https://github.com/mozilla-b2g/gaia/pull/32796","diff_url":"https://github.com/mozilla-b2g/gaia/pull/32796.diff","patch_url":"https://github.com/mozilla-b2g/gaia/pull/32796.patch","issue_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/32796","number":32796,"state":"open","locked":false,"title":"Bug 1194092 - [browser] Firefox Account sync history","user":{"login":"danhuang1202","id":4784004,"avatar_url":"https://avatars.githubusercontent.com/u/4784004?v=3","gravatar_id":"","url":"https://api.github.com/users/danhuang1202","html_url":"https://github.com/danhuang1202","followers_url":"https://api.github.com/users/danhuang1202/followers","following_url":"https://api.github.com/users/danhuang1202/following{/other_user}","gists_url":"https://api.github.com/users/danhuang1202/gists{/gist_id}","starred_url":"https://api.github.com/users/danhuang1202/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danhuang1202/subscriptions","organizations_url":"https://api.github.com/users/danhuang1202/orgs","repos_url":"https://api.github.com/users/danhuang1202/repos","events_url":"https://api.github.com/users/danhuang1202/events{/privacy}","received_events_url":"https://api.github.com/users/danhuang1202/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-28T06:08:24Z","updated_at":"2015-10-28T15:18:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"16fe1087339d99ef321c67110239fb0695e56da5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32796/commits","review_comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32796/comments","review_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/32796/comments","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/c7f8916fd98193b57d13090741db4d6c141a217a","head":{"label":"danhuang1202:1194092_fx_sync_history","ref":"1194092_fx_sync_history","sha":"c7f8916fd98193b57d13090741db4d6c141a217a","user":{"login":"danhuang1202","id":4784004,"avatar_url":"https://avatars.githubusercontent.com/u/4784004?v=3","gravatar_id":"","url":"https://api.github.com/users/danhuang1202","html_url":"https://github.com/danhuang1202","followers_url":"https://api.github.com/users/danhuang1202/followers","following_url":"https://api.github.com/users/danhuang1202/following{/other_user}","gists_url":"https://api.github.com/users/danhuang1202/gists{/gist_id}","starred_url":"https://api.github.com/users/danhuang1202/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danhuang1202/subscriptions","organizations_url":"https://api.github.com/users/danhuang1202/orgs","repos_url":"https://api.github.com/users/danhuang1202/repos","events_url":"https://api.github.com/users/danhuang1202/events{/privacy}","received_events_url":"https://api.github.com/users/danhuang1202/received_events","type":"User","site_admin":false},"repo":{"id":40878236,"name":"gaia","full_name":"danhuang1202/gaia","owner":{"login":"danhuang1202","id":4784004,"avatar_url":"https://avatars.githubusercontent.com/u/4784004?v=3","gravatar_id":"","url":"https://api.github.com/users/danhuang1202","html_url":"https://github.com/danhuang1202","followers_url":"https://api.github.com/users/danhuang1202/followers","following_url":"https://api.github.com/users/danhuang1202/following{/other_user}","gists_url":"https://api.github.com/users/danhuang1202/gists{/gist_id}","starred_url":"https://api.github.com/users/danhuang1202/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danhuang1202/subscriptions","organizations_url":"https://api.github.com/users/danhuang1202/orgs","repos_url":"https://api.github.com/users/danhuang1202/repos","events_url":"https://api.github.com/users/danhuang1202/events{/privacy}","received_events_url":"https://api.github.com/users/danhuang1202/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danhuang1202/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see","fork":true,"url":"https://api.github.com/repos/danhuang1202/gaia","forks_url":"https://api.github.com/repos/danhuang1202/gaia/forks","keys_url":"https://api.github.com/repos/danhuang1202/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danhuang1202/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danhuang1202/gaia/teams","hooks_url":"https://api.github.com/repos/danhuang1202/gaia/hooks","issue_events_url":"https://api.github.com/repos/danhuang1202/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/danhuang1202/gaia/events","assignees_url":"https://api.github.com/repos/danhuang1202/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/danhuang1202/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/danhuang1202/gaia/tags","blobs_url":"https://api.github.com/repos/danhuang1202/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danhuang1202/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danhuang1202/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/danhuang1202/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danhuang1202/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/danhuang1202/gaia/languages","stargazers_url":"https://api.github.com/repos/danhuang1202/gaia/stargazers","contributors_url":"https://api.github.com/repos/danhuang1202/gaia/contributors","subscribers_url":"https://api.github.com/repos/danhuang1202/gaia/subscribers","subscription_url":"https://api.github.com/repos/danhuang1202/gaia/subscription","commits_url":"https://api.github.com/repos/danhuang1202/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/danhuang1202/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/danhuang1202/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/danhuang1202/gaia/issues/comments{/number}","contents_url":"https://api.github.com/repos/danhuang1202/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/danhuang1202/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danhuang1202/gaia/merges","archive_url":"https://api.github.com/repos/danhuang1202/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danhuang1202/gaia/downloads","issues_url":"https://api.github.com/repos/danhuang1202/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/danhuang1202/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/danhuang1202/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/danhuang1202/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danhuang1202/gaia/labels{/name}","releases_url":"https://api.github.com/repos/danhuang1202/gaia/releases{/id}","created_at":"2015-08-17T08:38:52Z","updated_at":"2015-08-17T08:39:22Z","pushed_at":"2015-10-28T07:58:01Z","git_url":"git://github.com/danhuang1202/gaia.git","ssh_url":"git@github.com:danhuang1202/gaia.git","clone_url":"https://github.com/danhuang1202/gaia.git","svn_url":"https://github.com/danhuang1202/gaia","homepage":"https://wiki.mozilla.org/B2G","size":977884,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla-b2g:master","ref":"master","sha":"68febcc83f4efc2122c784aa01fbfdbc4b3f8151","user":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"repo":{"id":2317369,"name":"gaia","full_name":"mozilla-b2g/gaia","owner":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-b2g/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see","fork":false,"url":"https://api.github.com/repos/mozilla-b2g/gaia","forks_url":"https://api.github.com/repos/mozilla-b2g/gaia/forks","keys_url":"https://api.github.com/repos/mozilla-b2g/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-b2g/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-b2g/gaia/teams","hooks_url":"https://api.github.com/repos/mozilla-b2g/gaia/hooks","issue_events_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-b2g/gaia/events","assignees_url":"https://api.github.com/repos/mozilla-b2g/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-b2g/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/tags","blobs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-b2g/gaia/languages","stargazers_url":"https://api.github.com/repos/mozilla-b2g/gaia/stargazers","contributors_url":"https://api.github.com/repos/mozilla-b2g/gaia/contributors","subscribers_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscribers","subscription_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscription","commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla-b2g/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-b2g/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-b2g/gaia/merges","archive_url":"https://api.github.com/repos/mozilla-b2g/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-b2g/gaia/downloads","issues_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-b2g/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-b2g/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-b2g/gaia/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-b2g/gaia/releases{/id}","created_at":"2011-09-03T01:38:46Z","updated_at":"2015-10-26T01:49:34Z","pushed_at":"2015-10-28T15:16:13Z","git_url":"git://github.com/mozilla-b2g/gaia.git","ssh_url":"git@github.com:mozilla-b2g/gaia.git","clone_url":"https://github.com/mozilla-b2g/gaia.git","svn_url":"https://github.com/mozilla-b2g/gaia","homepage":"https://wiki.mozilla.org/B2G","size":1679501,"stargazers_count":1992,"watchers_count":1992,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":2496,"mirror_url":null,"open_issues_count":1261,"forks":2496,"open_issues":1261,"watchers":1992,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32796"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/32796"},"issue":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/32796"},"comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/32796/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32796/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/32796/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/c7f8916fd98193b57d13090741db4d6c141a217a"}}}}