{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/44142563","id":44142563,"diff_hunk":"@@ -70,16 +91,103 @@ AppUpdatable.prototype.clean = function() {\n AppUpdatable.prototype.availableCallBack = function() {\n   this.size = this.app.downloadSize;\n \n-  if (this.app.installState === 'installed') {\n-    UpdateManager.addToUpdatesQueue(this);\n-\n-    // we add these callbacks only now to prevent interfering\n-    // with other modules (especially the AppInstallManager)\n-    this.app.ondownloaderror = this.errorCallBack.bind(this);\n-    this.app.ondownloadsuccess = this.successCallBack.bind(this);\n-    this.app.ondownloadapplied = this.appliedCallBack.bind(this);\n-    this.app.onprogress = this.progressCallBack.bind(this);\n+  if (this.app.installState !== 'installed') {\n+    return;\n   }\n+\n+  let settings = [\n+    setting(AppUpdatable.AUTO_UPDATE),\n+    setting(AppUpdatable.NOTIFY_UPDATE)\n+  ];","path":"apps/system/js/updatable.js","position":57,"original_position":57,"commit_id":"a9da6974427f74cccedba2003546b97c58f6de0c","original_commit_id":"a9da6974427f74cccedba2003546b97c58f6de0c","user":{"login":"mikehenrty","id":635365,"avatar_url":"https://avatars.githubusercontent.com/u/635365?v=3","gravatar_id":"","url":"https://api.github.com/users/mikehenrty","html_url":"https://github.com/mikehenrty","followers_url":"https://api.github.com/users/mikehenrty/followers","following_url":"https://api.github.com/users/mikehenrty/following{/other_user}","gists_url":"https://api.github.com/users/mikehenrty/gists{/gist_id}","starred_url":"https://api.github.com/users/mikehenrty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikehenrty/subscriptions","organizations_url":"https://api.github.com/users/mikehenrty/orgs","repos_url":"https://api.github.com/users/mikehenrty/repos","events_url":"https://api.github.com/users/mikehenrty/events{/privacy}","received_events_url":"https://api.github.com/users/mikehenrty/received_events","type":"User","site_admin":false},"body":"We shouldn't read these settings each time. Better would be to read the setting the first time by adding a SettingsObserver, and then keep the value cached in a static variable.","created_at":"2015-11-06T14:43:31Z","updated_at":"2015-11-06T14:43:31Z","html_url":"https://github.com/mozilla-b2g/gaia/pull/33044#discussion_r44142563","pull_request_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33044","_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/44142563"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/33044#discussion_r44142563"},"pull_request":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33044"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33044","id":49958366,"html_url":"https://github.com/mozilla-b2g/gaia/pull/33044","diff_url":"https://github.com/mozilla-b2g/gaia/pull/33044.diff","patch_url":"https://github.com/mozilla-b2g/gaia/pull/33044.patch","issue_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/33044","number":33044,"state":"open","locked":false,"title":"Bug 1216301 - Silent updates for add-ons","user":{"login":"daleharvey","id":37787,"avatar_url":"https://avatars.githubusercontent.com/u/37787?v=3","gravatar_id":"","url":"https://api.github.com/users/daleharvey","html_url":"https://github.com/daleharvey","followers_url":"https://api.github.com/users/daleharvey/followers","following_url":"https://api.github.com/users/daleharvey/following{/other_user}","gists_url":"https://api.github.com/users/daleharvey/gists{/gist_id}","starred_url":"https://api.github.com/users/daleharvey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daleharvey/subscriptions","organizations_url":"https://api.github.com/users/daleharvey/orgs","repos_url":"https://api.github.com/users/daleharvey/repos","events_url":"https://api.github.com/users/daleharvey/events{/privacy}","received_events_url":"https://api.github.com/users/daleharvey/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-06T14:19:42Z","updated_at":"2015-11-06T14:43:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4b55ef36379979a7a31efa1e7860158fcfc6e674","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33044/commits","review_comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33044/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/33044/comments","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/a9da6974427f74cccedba2003546b97c58f6de0c","head":{"label":"daleharvey:1216301","ref":"1216301","sha":"a9da6974427f74cccedba2003546b97c58f6de0c","user":{"login":"daleharvey","id":37787,"avatar_url":"https://avatars.githubusercontent.com/u/37787?v=3","gravatar_id":"","url":"https://api.github.com/users/daleharvey","html_url":"https://github.com/daleharvey","followers_url":"https://api.github.com/users/daleharvey/followers","following_url":"https://api.github.com/users/daleharvey/following{/other_user}","gists_url":"https://api.github.com/users/daleharvey/gists{/gist_id}","starred_url":"https://api.github.com/users/daleharvey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daleharvey/subscriptions","organizations_url":"https://api.github.com/users/daleharvey/orgs","repos_url":"https://api.github.com/users/daleharvey/repos","events_url":"https://api.github.com/users/daleharvey/events{/privacy}","received_events_url":"https://api.github.com/users/daleharvey/received_events","type":"User","site_admin":false},"repo":{"id":18515937,"name":"gaia","full_name":"daleharvey/gaia","owner":{"login":"daleharvey","id":37787,"avatar_url":"https://avatars.githubusercontent.com/u/37787?v=3","gravatar_id":"","url":"https://api.github.com/users/daleharvey","html_url":"https://github.com/daleharvey","followers_url":"https://api.github.com/users/daleharvey/followers","following_url":"https://api.github.com/users/daleharvey/following{/other_user}","gists_url":"https://api.github.com/users/daleharvey/gists{/gist_id}","starred_url":"https://api.github.com/users/daleharvey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daleharvey/subscriptions","organizations_url":"https://api.github.com/users/daleharvey/orgs","repos_url":"https://api.github.com/users/daleharvey/repos","events_url":"https://api.github.com/users/daleharvey/events{/privacy}","received_events_url":"https://api.github.com/users/daleharvey/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/daleharvey/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 https://wiki.mozilla.org/Release_Management/B2G_Landing","fork":true,"url":"https://api.github.com/repos/daleharvey/gaia","forks_url":"https://api.github.com/repos/daleharvey/gaia/forks","keys_url":"https://api.github.com/repos/daleharvey/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/daleharvey/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/daleharvey/gaia/teams","hooks_url":"https://api.github.com/repos/daleharvey/gaia/hooks","issue_events_url":"https://api.github.com/repos/daleharvey/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/daleharvey/gaia/events","assignees_url":"https://api.github.com/repos/daleharvey/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/daleharvey/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/daleharvey/gaia/tags","blobs_url":"https://api.github.com/repos/daleharvey/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/daleharvey/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/daleharvey/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/daleharvey/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/daleharvey/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/daleharvey/gaia/languages","stargazers_url":"https://api.github.com/repos/daleharvey/gaia/stargazers","contributors_url":"https://api.github.com/repos/daleharvey/gaia/contributors","subscribers_url":"https://api.github.com/repos/daleharvey/gaia/subscribers","subscription_url":"https://api.github.com/repos/daleharvey/gaia/subscription","commits_url":"https://api.github.com/repos/daleharvey/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/daleharvey/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/daleharvey/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/daleharvey/gaia/issues/comments{/number}","contents_url":"https://api.github.com/repos/daleharvey/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/daleharvey/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/daleharvey/gaia/merges","archive_url":"https://api.github.com/repos/daleharvey/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/daleharvey/gaia/downloads","issues_url":"https://api.github.com/repos/daleharvey/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/daleharvey/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/daleharvey/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/daleharvey/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/daleharvey/gaia/labels{/name}","releases_url":"https://api.github.com/repos/daleharvey/gaia/releases{/id}","created_at":"2014-04-07T12:20:24Z","updated_at":"2014-07-11T08:49:45Z","pushed_at":"2015-11-06T14:16:26Z","git_url":"git://github.com/daleharvey/gaia.git","ssh_url":"git@github.com:daleharvey/gaia.git","clone_url":"https://github.com/daleharvey/gaia.git","svn_url":"https://github.com/daleharvey/gaia","homepage":"https://wiki.mozilla.org/B2G","size":956180,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla-b2g:master","ref":"master","sha":"b9098cc03968e3cc71cd0f379713b522398311bc","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-11-04T11:46:14Z","pushed_at":"2015-11-06T14:43:00Z","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":1697115,"stargazers_count":1994,"watchers_count":1994,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":2514,"mirror_url":null,"open_issues_count":1242,"forks":2514,"open_issues":1242,"watchers":1994,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33044"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/33044"},"issue":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/33044"},"comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/33044/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/33044/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/33044/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/a9da6974427f74cccedba2003546b97c58f6de0c"}}}}