{"action":"created","comment":{"url":"https://api.github.com/repos/atom/electron/pulls/comments/32604682","id":32604682,"diff_hunk":"@@ -215,6 +216,15 @@ void App::SetAppUserModelId(const std::string& app_id) {\n #endif\n }\n \n+void App::RegisterStandardSchemes(const std::vector<std::string>& schemes) {\n+  std::stringstream stream;\n+  auto vectorToString = [&stream](const std::string& scheme) {\n+    stream << scheme << \",\";\n+  };\n+  std::for_each(schemes.begin(), schemes.end(), vectorToString);","path":"atom/browser/api/atom_api_app.cc","position":17,"original_position":17,"commit_id":"d40529bf5ff1e04f3b542382e6c7dca9084feb16","original_commit_id":"d40529bf5ff1e04f3b542382e6c7dca9084feb16","user":{"login":"zcbenz","id":639601,"avatar_url":"https://avatars.githubusercontent.com/u/639601?v=3","gravatar_id":"","url":"https://api.github.com/users/zcbenz","html_url":"https://github.com/zcbenz","followers_url":"https://api.github.com/users/zcbenz/followers","following_url":"https://api.github.com/users/zcbenz/following{/other_user}","gists_url":"https://api.github.com/users/zcbenz/gists{/gist_id}","starred_url":"https://api.github.com/users/zcbenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zcbenz/subscriptions","organizations_url":"https://api.github.com/users/zcbenz/orgs","repos_url":"https://api.github.com/users/zcbenz/repos","events_url":"https://api.github.com/users/zcbenz/events{/privacy}","received_events_url":"https://api.github.com/users/zcbenz/received_events","type":"User","site_admin":true},"body":"There is `base::JoinString`.\r\n\r\nThe string concatenating should be put in `AtomBrowserClient::SetCustomSchemes`, and `AtomBrowserClient::SetCustomSchemes` should take `vector` as parameter.","created_at":"2015-06-17T08:30:40Z","updated_at":"2015-06-17T08:30:40Z","html_url":"https://github.com/atom/electron/pull/1970#discussion_r32604682","pull_request_url":"https://api.github.com/repos/atom/electron/pulls/1970","_links":{"self":{"href":"https://api.github.com/repos/atom/electron/pulls/comments/32604682"},"html":{"href":"https://github.com/atom/electron/pull/1970#discussion_r32604682"},"pull_request":{"href":"https://api.github.com/repos/atom/electron/pulls/1970"}}},"pull_request":{"url":"https://api.github.com/repos/atom/electron/pulls/1970","id":37645514,"html_url":"https://github.com/atom/electron/pull/1970","diff_url":"https://github.com/atom/electron/pull/1970.diff","patch_url":"https://github.com/atom/electron/pull/1970.patch","issue_url":"https://api.github.com/repos/atom/electron/issues/1970","number":1970,"state":"open","locked":false,"title":"app: api to register custom schemes to standard schemes","user":{"login":"deepak1556","id":964386,"avatar_url":"https://avatars.githubusercontent.com/u/964386?v=3","gravatar_id":"","url":"https://api.github.com/users/deepak1556","html_url":"https://github.com/deepak1556","followers_url":"https://api.github.com/users/deepak1556/followers","following_url":"https://api.github.com/users/deepak1556/following{/other_user}","gists_url":"https://api.github.com/users/deepak1556/gists{/gist_id}","starred_url":"https://api.github.com/users/deepak1556/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deepak1556/subscriptions","organizations_url":"https://api.github.com/users/deepak1556/orgs","repos_url":"https://api.github.com/users/deepak1556/repos","events_url":"https://api.github.com/users/deepak1556/events{/privacy}","received_events_url":"https://api.github.com/users/deepak1556/received_events","type":"User","site_admin":false},"body":"Fixes #1879 \r\n\r\n`AddAdditionalSchemes` gets called at early stage of content [intialisation](https://code.google.com/p/chromium/codesearch#chromium/src/content/app/content_main_runner.cc&sq=package:chromium&type=cs&l=703&rcl=1434281558) and standard schemes list gets locked once its done. Couldnt come up with a better approach than extracting from environment varaible `export SCHEMES=library,test,atom`. Any better option to it ?\r\n\r\n```\r\n> window.location\r\nLocation {ancestorOrigins: DOMStringList, href: \"test://example.com/c.html\"}\r\nancestorOrigins: DOMStringListassign: () { [native code] }\r\nhash: \"\"\r\nhost: \"example.com\"\r\nhostname: \"example.com\"\r\nhref: \"test://example.com/c.html\"\r\norigin: \"test://example.com\"\r\npathname: \"/c.html\"\r\nport: \"\"\r\nprotocol: \"test:\"\r\nreload: reload() { [native code] }\r\nreplace: () { [native code] }\r\nsearch: \"\"\r\ntoString: toString() { [native code] }\r\nvalueOf: valueOf() { [native code] }\r\n__proto__: Location\r\n```","created_at":"2015-06-14T17:58:43Z","updated_at":"2015-06-17T08:30:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e9737ca05f62505c20b485417b659ce3b03a47db","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/atom/electron/pulls/1970/commits","review_comments_url":"https://api.github.com/repos/atom/electron/pulls/1970/comments","review_comment_url":"https://api.github.com/repos/atom/electron/pulls/comments{/number}","comments_url":"https://api.github.com/repos/atom/electron/issues/1970/comments","statuses_url":"https://api.github.com/repos/atom/electron/statuses/d40529bf5ff1e04f3b542382e6c7dca9084feb16","head":{"label":"deepak1556:scheme_patch","ref":"scheme_patch","sha":"d40529bf5ff1e04f3b542382e6c7dca9084feb16","user":{"login":"deepak1556","id":964386,"avatar_url":"https://avatars.githubusercontent.com/u/964386?v=3","gravatar_id":"","url":"https://api.github.com/users/deepak1556","html_url":"https://github.com/deepak1556","followers_url":"https://api.github.com/users/deepak1556/followers","following_url":"https://api.github.com/users/deepak1556/following{/other_user}","gists_url":"https://api.github.com/users/deepak1556/gists{/gist_id}","starred_url":"https://api.github.com/users/deepak1556/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deepak1556/subscriptions","organizations_url":"https://api.github.com/users/deepak1556/orgs","repos_url":"https://api.github.com/users/deepak1556/repos","events_url":"https://api.github.com/users/deepak1556/events{/privacy}","received_events_url":"https://api.github.com/users/deepak1556/received_events","type":"User","site_admin":false},"repo":{"id":19500833,"name":"atom-shell","full_name":"deepak1556/atom-shell","owner":{"login":"deepak1556","id":964386,"avatar_url":"https://avatars.githubusercontent.com/u/964386?v=3","gravatar_id":"","url":"https://api.github.com/users/deepak1556","html_url":"https://github.com/deepak1556","followers_url":"https://api.github.com/users/deepak1556/followers","following_url":"https://api.github.com/users/deepak1556/following{/other_user}","gists_url":"https://api.github.com/users/deepak1556/gists{/gist_id}","starred_url":"https://api.github.com/users/deepak1556/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deepak1556/subscriptions","organizations_url":"https://api.github.com/users/deepak1556/orgs","repos_url":"https://api.github.com/users/deepak1556/repos","events_url":"https://api.github.com/users/deepak1556/events{/privacy}","received_events_url":"https://api.github.com/users/deepak1556/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/deepak1556/atom-shell","description":"Cross-platform desktop application shell","fork":true,"url":"https://api.github.com/repos/deepak1556/atom-shell","forks_url":"https://api.github.com/repos/deepak1556/atom-shell/forks","keys_url":"https://api.github.com/repos/deepak1556/atom-shell/keys{/key_id}","collaborators_url":"https://api.github.com/repos/deepak1556/atom-shell/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/deepak1556/atom-shell/teams","hooks_url":"https://api.github.com/repos/deepak1556/atom-shell/hooks","issue_events_url":"https://api.github.com/repos/deepak1556/atom-shell/issues/events{/number}","events_url":"https://api.github.com/repos/deepak1556/atom-shell/events","assignees_url":"https://api.github.com/repos/deepak1556/atom-shell/assignees{/user}","branches_url":"https://api.github.com/repos/deepak1556/atom-shell/branches{/branch}","tags_url":"https://api.github.com/repos/deepak1556/atom-shell/tags","blobs_url":"https://api.github.com/repos/deepak1556/atom-shell/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/deepak1556/atom-shell/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/deepak1556/atom-shell/git/refs{/sha}","trees_url":"https://api.github.com/repos/deepak1556/atom-shell/git/trees{/sha}","statuses_url":"https://api.github.com/repos/deepak1556/atom-shell/statuses/{sha}","languages_url":"https://api.github.com/repos/deepak1556/atom-shell/languages","stargazers_url":"https://api.github.com/repos/deepak1556/atom-shell/stargazers","contributors_url":"https://api.github.com/repos/deepak1556/atom-shell/contributors","subscribers_url":"https://api.github.com/repos/deepak1556/atom-shell/subscribers","subscription_url":"https://api.github.com/repos/deepak1556/atom-shell/subscription","commits_url":"https://api.github.com/repos/deepak1556/atom-shell/commits{/sha}","git_commits_url":"https://api.github.com/repos/deepak1556/atom-shell/git/commits{/sha}","comments_url":"https://api.github.com/repos/deepak1556/atom-shell/comments{/number}","issue_comment_url":"https://api.github.com/repos/deepak1556/atom-shell/issues/comments{/number}","contents_url":"https://api.github.com/repos/deepak1556/atom-shell/contents/{+path}","compare_url":"https://api.github.com/repos/deepak1556/atom-shell/compare/{base}...{head}","merges_url":"https://api.github.com/repos/deepak1556/atom-shell/merges","archive_url":"https://api.github.com/repos/deepak1556/atom-shell/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/deepak1556/atom-shell/downloads","issues_url":"https://api.github.com/repos/deepak1556/atom-shell/issues{/number}","pulls_url":"https://api.github.com/repos/deepak1556/atom-shell/pulls{/number}","milestones_url":"https://api.github.com/repos/deepak1556/atom-shell/milestones{/number}","notifications_url":"https://api.github.com/repos/deepak1556/atom-shell/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/deepak1556/atom-shell/labels{/name}","releases_url":"https://api.github.com/repos/deepak1556/atom-shell/releases{/id}","created_at":"2014-05-06T15:58:25Z","updated_at":"2015-03-10T06:12:17Z","pushed_at":"2015-06-17T06:38:53Z","git_url":"git://github.com/deepak1556/atom-shell.git","ssh_url":"git@github.com:deepak1556/atom-shell.git","clone_url":"https://github.com/deepak1556/atom-shell.git","svn_url":"https://github.com/deepak1556/atom-shell","homepage":"","size":9507,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"atom:master","ref":"master","sha":"bd704dd8aaa9a0f53897627838dfa5bffbaf0d78","user":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"repo":{"id":9384267,"name":"electron","full_name":"atom/electron","owner":{"login":"atom","id":1089146,"avatar_url":"https://avatars.githubusercontent.com/u/1089146?v=3","gravatar_id":"","url":"https://api.github.com/users/atom","html_url":"https://github.com/atom","followers_url":"https://api.github.com/users/atom/followers","following_url":"https://api.github.com/users/atom/following{/other_user}","gists_url":"https://api.github.com/users/atom/gists{/gist_id}","starred_url":"https://api.github.com/users/atom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/atom/subscriptions","organizations_url":"https://api.github.com/users/atom/orgs","repos_url":"https://api.github.com/users/atom/repos","events_url":"https://api.github.com/users/atom/events{/privacy}","received_events_url":"https://api.github.com/users/atom/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/atom/electron","description":"Build cross platform desktop apps with web technologies","fork":false,"url":"https://api.github.com/repos/atom/electron","forks_url":"https://api.github.com/repos/atom/electron/forks","keys_url":"https://api.github.com/repos/atom/electron/keys{/key_id}","collaborators_url":"https://api.github.com/repos/atom/electron/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/atom/electron/teams","hooks_url":"https://api.github.com/repos/atom/electron/hooks","issue_events_url":"https://api.github.com/repos/atom/electron/issues/events{/number}","events_url":"https://api.github.com/repos/atom/electron/events","assignees_url":"https://api.github.com/repos/atom/electron/assignees{/user}","branches_url":"https://api.github.com/repos/atom/electron/branches{/branch}","tags_url":"https://api.github.com/repos/atom/electron/tags","blobs_url":"https://api.github.com/repos/atom/electron/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/atom/electron/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/atom/electron/git/refs{/sha}","trees_url":"https://api.github.com/repos/atom/electron/git/trees{/sha}","statuses_url":"https://api.github.com/repos/atom/electron/statuses/{sha}","languages_url":"https://api.github.com/repos/atom/electron/languages","stargazers_url":"https://api.github.com/repos/atom/electron/stargazers","contributors_url":"https://api.github.com/repos/atom/electron/contributors","subscribers_url":"https://api.github.com/repos/atom/electron/subscribers","subscription_url":"https://api.github.com/repos/atom/electron/subscription","commits_url":"https://api.github.com/repos/atom/electron/commits{/sha}","git_commits_url":"https://api.github.com/repos/atom/electron/git/commits{/sha}","comments_url":"https://api.github.com/repos/atom/electron/comments{/number}","issue_comment_url":"https://api.github.com/repos/atom/electron/issues/comments{/number}","contents_url":"https://api.github.com/repos/atom/electron/contents/{+path}","compare_url":"https://api.github.com/repos/atom/electron/compare/{base}...{head}","merges_url":"https://api.github.com/repos/atom/electron/merges","archive_url":"https://api.github.com/repos/atom/electron/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/atom/electron/downloads","issues_url":"https://api.github.com/repos/atom/electron/issues{/number}","pulls_url":"https://api.github.com/repos/atom/electron/pulls{/number}","milestones_url":"https://api.github.com/repos/atom/electron/milestones{/number}","notifications_url":"https://api.github.com/repos/atom/electron/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/atom/electron/labels{/name}","releases_url":"https://api.github.com/repos/atom/electron/releases{/id}","created_at":"2013-04-12T01:47:36Z","updated_at":"2015-06-17T07:36:11Z","pushed_at":"2015-06-17T07:53:15Z","git_url":"git://github.com/atom/electron.git","ssh_url":"git@github.com:atom/electron.git","clone_url":"https://github.com/atom/electron.git","svn_url":"https://github.com/atom/electron","homepage":"http://electron.atom.io","size":20428,"stargazers_count":12485,"watchers_count":12485,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":940,"mirror_url":null,"open_issues_count":195,"forks":940,"open_issues":195,"watchers":12485,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/atom/electron/pulls/1970"},"html":{"href":"https://github.com/atom/electron/pull/1970"},"issue":{"href":"https://api.github.com/repos/atom/electron/issues/1970"},"comments":{"href":"https://api.github.com/repos/atom/electron/issues/1970/comments"},"review_comments":{"href":"https://api.github.com/repos/atom/electron/pulls/1970/comments"},"review_comment":{"href":"https://api.github.com/repos/atom/electron/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/atom/electron/pulls/1970/commits"},"statuses":{"href":"https://api.github.com/repos/atom/electron/statuses/d40529bf5ff1e04f3b542382e6c7dca9084feb16"}}}}