{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/stetho/pulls/comments/47171541","id":47171541,"diff_hunk":"@@ -347,12 +365,17 @@ public DefaultInspectorModulesBuilder remove(String moduleName) {\n               new RhinoDetectingRuntimeReplFactory(mContext)));\n       provideIfDesired(new Worker());\n       if (Build.VERSION.SDK_INT >= DatabaseConstants.MIN_API_LEVEL) {\n-        provideIfDesired(\n-            new Database(\n-                mContext,\n-                mDatabaseFiles != null ?\n-                    mDatabaseFiles :\n-                    new DefaultDatabaseFilesProvider(mContext)));\n+        Database database = new Database();\n+        database.add(new SqliteDatabaseDriver(mContext,\n+            mDatabaseFilesProvider != null ?\n+                mDatabaseFilesProvider :\n+                new DefaultDatabaseFilesProvider(mContext)));\n+        if (mDatabaseDrivers != null) {\n+          for (Database.DatabaseDriver databaseDriver : mDatabaseDrivers) {","path":"stetho/src/main/java/com/facebook/stetho/Stetho.java","position":65,"original_position":65,"commit_id":"18dbfc9664d3209e6394b2c709b1b9a0f9ab54a2","original_commit_id":"18dbfc9664d3209e6394b2c709b1b9a0f9ab54a2","user":{"login":"jasta","id":83791,"avatar_url":"https://avatars.githubusercontent.com/u/83791?v=3","gravatar_id":"","url":"https://api.github.com/users/jasta","html_url":"https://github.com/jasta","followers_url":"https://api.github.com/users/jasta/followers","following_url":"https://api.github.com/users/jasta/following{/other_user}","gists_url":"https://api.github.com/users/jasta/gists{/gist_id}","starred_url":"https://api.github.com/users/jasta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasta/subscriptions","organizations_url":"https://api.github.com/users/jasta/orgs","repos_url":"https://api.github.com/users/jasta/repos","events_url":"https://api.github.com/users/jasta/events{/privacy}","received_events_url":"https://api.github.com/users/jasta/received_events","type":"User","site_admin":false},"body":"nit: this syntax evaluates to a slow expression on Dalvik devices.  I usually get in the habit of writing:\r\n\r\n```java\r\nfor (int i = 0, N = mDatabaseDrivers.size(); i < N; i++) {\r\n  database.add(mDatabaseDrivers.get(i));\r\n}\r\n```\r\n\r\nIt's almost the same amount of typing but doesn't allocate the iterator and the pattern also works to iterate things like `SimpleArrayMap` and `SparseArray`.","created_at":"2015-12-09T23:52:40Z","updated_at":"2015-12-09T23:52:40Z","html_url":"https://github.com/facebook/stetho/pull/264#discussion_r47171541","pull_request_url":"https://api.github.com/repos/facebook/stetho/pulls/264","_links":{"self":{"href":"https://api.github.com/repos/facebook/stetho/pulls/comments/47171541"},"html":{"href":"https://github.com/facebook/stetho/pull/264#discussion_r47171541"},"pull_request":{"href":"https://api.github.com/repos/facebook/stetho/pulls/264"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/stetho/pulls/264","id":43408114,"html_url":"https://github.com/facebook/stetho/pull/264","diff_url":"https://github.com/facebook/stetho/pull/264.diff","patch_url":"https://github.com/facebook/stetho/pull/264.patch","issue_url":"https://api.github.com/repos/facebook/stetho/issues/264","number":264,"state":"open","locked":false,"title":"Added support of Database Domain extensions","user":{"login":"sromku","id":583039,"avatar_url":"https://avatars.githubusercontent.com/u/583039?v=3","gravatar_id":"","url":"https://api.github.com/users/sromku","html_url":"https://github.com/sromku","followers_url":"https://api.github.com/users/sromku/followers","following_url":"https://api.github.com/users/sromku/following{/other_user}","gists_url":"https://api.github.com/users/sromku/gists{/gist_id}","starred_url":"https://api.github.com/users/sromku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sromku/subscriptions","organizations_url":"https://api.github.com/users/sromku/orgs","repos_url":"https://api.github.com/users/sromku/repos","events_url":"https://api.github.com/users/sromku/events{/privacy}","received_events_url":"https://api.github.com/users/sromku/received_events","type":"User","site_admin":false},"body":"Based on ticket #258 ","created_at":"2015-08-26T14:27:22Z","updated_at":"2015-12-09T23:52:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7051cb4fe808cde133cb6320b9c866d80c7916b5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/facebook/stetho/pulls/264/commits","review_comments_url":"https://api.github.com/repos/facebook/stetho/pulls/264/comments","review_comment_url":"https://api.github.com/repos/facebook/stetho/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/stetho/issues/264/comments","statuses_url":"https://api.github.com/repos/facebook/stetho/statuses/18dbfc9664d3209e6394b2c709b1b9a0f9ab54a2","head":{"label":"sromku:master","ref":"master","sha":"18dbfc9664d3209e6394b2c709b1b9a0f9ab54a2","user":{"login":"sromku","id":583039,"avatar_url":"https://avatars.githubusercontent.com/u/583039?v=3","gravatar_id":"","url":"https://api.github.com/users/sromku","html_url":"https://github.com/sromku","followers_url":"https://api.github.com/users/sromku/followers","following_url":"https://api.github.com/users/sromku/following{/other_user}","gists_url":"https://api.github.com/users/sromku/gists{/gist_id}","starred_url":"https://api.github.com/users/sromku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sromku/subscriptions","organizations_url":"https://api.github.com/users/sromku/orgs","repos_url":"https://api.github.com/users/sromku/repos","events_url":"https://api.github.com/users/sromku/events{/privacy}","received_events_url":"https://api.github.com/users/sromku/received_events","type":"User","site_admin":false},"repo":{"id":41427323,"name":"stetho","full_name":"sromku/stetho","owner":{"login":"sromku","id":583039,"avatar_url":"https://avatars.githubusercontent.com/u/583039?v=3","gravatar_id":"","url":"https://api.github.com/users/sromku","html_url":"https://github.com/sromku","followers_url":"https://api.github.com/users/sromku/followers","following_url":"https://api.github.com/users/sromku/following{/other_user}","gists_url":"https://api.github.com/users/sromku/gists{/gist_id}","starred_url":"https://api.github.com/users/sromku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sromku/subscriptions","organizations_url":"https://api.github.com/users/sromku/orgs","repos_url":"https://api.github.com/users/sromku/repos","events_url":"https://api.github.com/users/sromku/events{/privacy}","received_events_url":"https://api.github.com/users/sromku/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sromku/stetho","description":"Stetho is a debug bridge for Android applications, enabling the powerful Chrome Developer Tools and much more.","fork":true,"url":"https://api.github.com/repos/sromku/stetho","forks_url":"https://api.github.com/repos/sromku/stetho/forks","keys_url":"https://api.github.com/repos/sromku/stetho/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sromku/stetho/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sromku/stetho/teams","hooks_url":"https://api.github.com/repos/sromku/stetho/hooks","issue_events_url":"https://api.github.com/repos/sromku/stetho/issues/events{/number}","events_url":"https://api.github.com/repos/sromku/stetho/events","assignees_url":"https://api.github.com/repos/sromku/stetho/assignees{/user}","branches_url":"https://api.github.com/repos/sromku/stetho/branches{/branch}","tags_url":"https://api.github.com/repos/sromku/stetho/tags","blobs_url":"https://api.github.com/repos/sromku/stetho/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sromku/stetho/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sromku/stetho/git/refs{/sha}","trees_url":"https://api.github.com/repos/sromku/stetho/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sromku/stetho/statuses/{sha}","languages_url":"https://api.github.com/repos/sromku/stetho/languages","stargazers_url":"https://api.github.com/repos/sromku/stetho/stargazers","contributors_url":"https://api.github.com/repos/sromku/stetho/contributors","subscribers_url":"https://api.github.com/repos/sromku/stetho/subscribers","subscription_url":"https://api.github.com/repos/sromku/stetho/subscription","commits_url":"https://api.github.com/repos/sromku/stetho/commits{/sha}","git_commits_url":"https://api.github.com/repos/sromku/stetho/git/commits{/sha}","comments_url":"https://api.github.com/repos/sromku/stetho/comments{/number}","issue_comment_url":"https://api.github.com/repos/sromku/stetho/issues/comments{/number}","contents_url":"https://api.github.com/repos/sromku/stetho/contents/{+path}","compare_url":"https://api.github.com/repos/sromku/stetho/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sromku/stetho/merges","archive_url":"https://api.github.com/repos/sromku/stetho/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sromku/stetho/downloads","issues_url":"https://api.github.com/repos/sromku/stetho/issues{/number}","pulls_url":"https://api.github.com/repos/sromku/stetho/pulls{/number}","milestones_url":"https://api.github.com/repos/sromku/stetho/milestones{/number}","notifications_url":"https://api.github.com/repos/sromku/stetho/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sromku/stetho/labels{/name}","releases_url":"https://api.github.com/repos/sromku/stetho/releases{/id}","created_at":"2015-08-26T13:31:26Z","updated_at":"2015-08-26T13:31:27Z","pushed_at":"2015-10-05T16:57:19Z","git_url":"git://github.com/sromku/stetho.git","ssh_url":"git@github.com:sromku/stetho.git","clone_url":"https://github.com/sromku/stetho.git","svn_url":"https://github.com/sromku/stetho","homepage":"http://facebook.github.io/stetho/","size":1599,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"facebook:master","ref":"master","sha":"2428d52ce29ddaf78e8007803d8218968cc74ce6","user":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":29703871,"name":"stetho","full_name":"facebook/stetho","owner":{"login":"facebook","id":69631,"avatar_url":"https://avatars.githubusercontent.com/u/69631?v=3","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/stetho","description":"Stetho is a debug bridge for Android applications, enabling the powerful Chrome Developer Tools and much more.","fork":false,"url":"https://api.github.com/repos/facebook/stetho","forks_url":"https://api.github.com/repos/facebook/stetho/forks","keys_url":"https://api.github.com/repos/facebook/stetho/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/stetho/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/stetho/teams","hooks_url":"https://api.github.com/repos/facebook/stetho/hooks","issue_events_url":"https://api.github.com/repos/facebook/stetho/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/stetho/events","assignees_url":"https://api.github.com/repos/facebook/stetho/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/stetho/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/stetho/tags","blobs_url":"https://api.github.com/repos/facebook/stetho/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/stetho/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/stetho/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/stetho/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/stetho/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/stetho/languages","stargazers_url":"https://api.github.com/repos/facebook/stetho/stargazers","contributors_url":"https://api.github.com/repos/facebook/stetho/contributors","subscribers_url":"https://api.github.com/repos/facebook/stetho/subscribers","subscription_url":"https://api.github.com/repos/facebook/stetho/subscription","commits_url":"https://api.github.com/repos/facebook/stetho/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/stetho/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/stetho/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/stetho/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/stetho/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/stetho/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/stetho/merges","archive_url":"https://api.github.com/repos/facebook/stetho/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/stetho/downloads","issues_url":"https://api.github.com/repos/facebook/stetho/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/stetho/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/stetho/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/stetho/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/stetho/labels{/name}","releases_url":"https://api.github.com/repos/facebook/stetho/releases{/id}","created_at":"2015-01-22T22:34:10Z","updated_at":"2015-12-09T12:39:06Z","pushed_at":"2015-12-09T23:19:29Z","git_url":"git://github.com/facebook/stetho.git","ssh_url":"git@github.com:facebook/stetho.git","clone_url":"https://github.com/facebook/stetho.git","svn_url":"https://github.com/facebook/stetho","homepage":"http://facebook.github.io/stetho/","size":3681,"stargazers_count":3650,"watchers_count":3650,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":313,"mirror_url":null,"open_issues_count":34,"forks":313,"open_issues":34,"watchers":3650,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/stetho/pulls/264"},"html":{"href":"https://github.com/facebook/stetho/pull/264"},"issue":{"href":"https://api.github.com/repos/facebook/stetho/issues/264"},"comments":{"href":"https://api.github.com/repos/facebook/stetho/issues/264/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/stetho/pulls/264/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/stetho/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/stetho/pulls/264/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/stetho/statuses/18dbfc9664d3209e6394b2c709b1b9a0f9ab54a2"}}}}