Use List Code Owners for Path in change REST endpoint in frontend

The new rest API endpoint was added in the change 275384. The new
endpoint should be used to suggest code owners and will filter out
results that make no sense as a suggestion (e.g. it will filter out
service users).

Change-Id: Ie04e60913b632714199539ffdbc176a94083644f
diff --git a/ui/code-owners-service.js b/ui/code-owners-service.js
index bcac5cf..d690fcb 100644
--- a/ui/code-owners-service.js
+++ b/ui/code-owners-service.js
@@ -84,15 +84,13 @@
    * Returns a promise fetching the owners for a given path.
    *
    * @doc https://gerrit.googlesource.com/plugins/code-owners/+/refs/heads/master/resources/Documentation/rest-api.md#list-code-owners-for-path-in-branch
-   * @param {string} project
-   * @param {string} branch
+   * @param {string} changeId
    * @param {string} path
    */
-  listOwnersForPath(project, branch, path) {
+  listOwnersForPath(changeId, path) {
     return this.restApi.get(
-        `/projects/${encodeURIComponent(project)}/` +
-        `branches/${encodeURIComponent(branch)}/` +
-        `code_owners/${encodeURIComponent(path)}?limit=5&o=DETAILS`
+        `/changes/${changeId}/revisions/current/code_owners` +
+        `/${encodeURIComponent(path)}?limit=5&o=DETAILS`
     );
   }
 
@@ -441,8 +439,7 @@
         batchRequests.push(
             this.codeOwnerApi
                 .listOwnersForPath(
-                    this.change.project,
-                    this.change.branch,
+                    this.change.id,
                     filePath
                 )
                 .then(owners => {