| Index: chrome/browser/ui/webui/favicon_source.cc
|
| diff --git a/chrome/browser/ui/webui/favicon_source.cc b/chrome/browser/ui/webui/favicon_source.cc
|
| index 43dd432f1c735f3c907162eed492f86d2e94af4e..6f064ab26f72b38eaf1ff09df13476d6df123575 100644
|
| --- a/chrome/browser/ui/webui/favicon_source.cc
|
| +++ b/chrome/browser/ui/webui/favicon_source.cc
|
| @@ -58,8 +58,24 @@ void FaviconSource::StartDataRequest(const std::string& path,
|
| request_size_map_[request_id] = pixel_size;
|
| url = GURL(path.substr(slash + 1));
|
| } else {
|
| + // URL requests prefixed with "origin/" are converted to a form with an
|
| + // empty path and a valid scheme. (e.g., example.com -->
|
| + // http://example.com/ or http://example.com/a --> http://example.com/)
|
| + if (path.size() > 7 && path.substr(0, 7) == "origin/") {
|
| + std::string originalUrl = path.substr(7);
|
| +
|
| + // If the original URL does not specify a scheme (e.g., example.com
|
| + // instead of http://example.com), add "http://" as a default.
|
| + if (!GURL(originalUrl).has_scheme())
|
| + originalUrl = "http://" + originalUrl;
|
| +
|
| + // Strip the path beyond the top-level domain.
|
| + url = GURL(originalUrl).GetOrigin();
|
| + } else {
|
| + url = GURL(path);
|
| + }
|
| +
|
| request_size_map_[request_id] = 16;
|
| - url = GURL(path);
|
| }
|
|
|
| // Intercept requests for prepopulated pages.
|
|
|