chrome/browser/google_apis/gdata_wapi_service.cc
// Extracts the open link url from the JSON Feed. Used by AuthorizeApp().
Extracts the open link url from the JSON Feed.
Extracts the open link url from the JSON Feed .
void ExtractOpenLinkAndRun(const std::string app_id,
                           const AuthorizeAppCallback& callback,
                           GDataErrorCode error,
                           scoped_ptr<ResourceEntry> entry) {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
  if (!entry) {
    callback.Run(error, GURL());
    return;
  }
  const ScopedVector<google_apis::Link>& feed_links = entry->links();
  GURL open_link;
  for (size_t i = 0; i < feed_links.size(); ++i) {
    if (feed_links[i]->type() == google_apis::Link::LINK_OPEN_WITH &&
        feed_links[i]->app_id() == app_id) {
        open_link = feed_links[i]->href();
        break;
    }
  }
  callback.Run(error, open_link);
}
void ExtractOpenLinkAndRun ( const std :: string app_id , const AuthorizeAppCallback & callback , GDataErrorCode error , scoped_ptr < ResourceEntry > entry ) { DCHECK ( BrowserThread :: CurrentlyOn ( BrowserThread :: UI ) ) ; if ( ! entry ) { callback . Run ( error , GURL ( ) ) ; return ; } const ScopedVector < google_apis :: Link > & feed_links = entry -> links ( ) ; GURL open_link ; for ( size_t i = 0 ; i < feed_links . size ( ) ; ++ i ) { if ( feed_links [ i ] -> type ( ) == google_apis :: Link :: LINK_OPEN_WITH && feed_links [ i ] -> app_id ( ) == app_id ) { open_link = feed_links [ i ] -> href ( ) ; break ; } } callback . Run ( error , open_link ) ; }
Extracts the open link url from the JSON Feed.
Extracts the open link url from the JSON Feed .
// Entry not found in the feed.