chrome/browser/chromeos/drive/drive_webapps_registry.cc
// Extracts Web store id from its web store URL.
Extracts Web store id from its web store URL.
Extracts Web store id from its web store URL .
std::string GetWebStoreIdFromUrl(const GURL& url) {
  if (!StartsWithASCII(url.spec(), kStoreProductUrl, false)) {
    LOG(WARNING) << "Unrecognized product URL " << url.spec();
    return std::string();
  }
  FilePath path(url.path());
  std::vector<FilePath::StringType> components;
  path.GetComponents(&components);
  DCHECK_LE(2U, components.size());  
  return components[components.size() - 1];
}
std :: string GetWebStoreIdFromUrl ( const GURL & url ) { if ( ! StartsWithASCII ( url . spec ( ) , kStoreProductUrl , false ) ) { LOG ( WARNING ) << " " << url . spec ( ) ; return std :: string ( ) ; } FilePath path ( url . path ( ) ) ; std :: vector < FilePath :: StringType > components ; path . GetComponents ( & components ) ; DCHECK_LE ( 2U , components . size ( ) ) ; return components [ components . size ( ) - 1 ] ; }
Extracts Web store id from its web store URL.
Extracts Web store id from its web store URL .
// Coming from kStoreProductUrl // Return the last part of the path