old_contents: 'use strict';
  
  var profileClient = angular.module('oauth.profile', []);
  
  profileClient.factory('Profile', ['$http', 'AccessToken', '$rootScope', function($http, AccessToken, $rootScope) {
    var service = {};
    var profile;
  
    service.find = function(uri) {
      var promise = $http.get(uri, { headers: headers() });
      promise.success(function(response) {
          profile = response;
          $rootScope.$broadcast('oauth:profile', profile);
        });
      return promise;
    };
  
    service.get = function() {
      return profile;
    };
  
    service.set = function(resource) {
      profile = resource;
      return profile;
    };
  
    var headers = function() {
      return { Authorization: 'Bearer ' + AccessToken.get().access_token };
    };
  
    return service;
  }]);
  
new_contents: 'use strict';
  
  var profileClient = angular.module('oauth.profile', []);
  
  profileClient.factory('Profile', ['$http', 'AccessToken', '$rootScope', function($http, AccessToken, $rootScope) {
    var service = {};
    var profile;
  
    service.find = function(uri) {
      var promise = $http.get(uri, { headers: headers() });
      promise.then(function(response) {
          profile = response.data;
          $rootScope.$broadcast('oauth:profile', profile);
        });
      return promise;
    };
  
    service.get = function() {
      return profile;
    };
  
    service.set = function(resource) {
      profile = resource;
      return profile;
    };
  
    var headers = function() {
      return { Authorization: 'Bearer ' + AccessToken.get().access_token };
    };
  
    return service;
  }]);
  
subject: Update profile.js