1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // Custom binding for the Identity API.
7 var binding
= require('binding').Binding
.create('identity');
9 binding
.registerCustomHook(function(binding
, id
, contextType
) {
10 var apiFunctions
= binding
.apiFunctions
;
11 var identity
= binding
.compiledApi
;
13 apiFunctions
.setHandleRequest('getRedirectURL', function(path
) {
14 if (path
=== null || path
=== undefined)
20 return 'https://' + id
+ '.chromiumapp.org' + path
;
24 exports
.binding
= binding
.generate();