blob: 2cf304a4fda520a4bb06f3e2959f55a7e56ed5a7 [file] [log] [blame]
// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Custom binding for the Identity API.
apiBridge.registerCustomHook(function(binding, id, contextType) {
const apiFunctions = binding.apiFunctions;
apiFunctions.setHandleRequest('getRedirectURL', function(path) {
if (path === null || path === undefined) {
path = '/';
} else {
path = String(path);
}
if (path[0] !== '/') {
path = '/' + path;
}
return 'https://' + id + '.chromiumapp.org' + path;
});
});