| 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 b71df5df6a294bbbfaf77b80c3e611671ef2238e..45522732b755fe411cb35e45929c56361a6d8aee 100644
|
| --- a/chrome/browser/ui/webui/favicon_source.cc
|
| +++ b/chrome/browser/ui/webui/favicon_source.cc
|
| @@ -82,7 +82,7 @@ std::string FaviconSource::GetSource() const {
|
| }
|
|
|
| void FaviconSource::StartDataRequest(
|
| - const std::string& raw_path,
|
| + const std::string& path,
|
| int render_process_id,
|
| int render_view_id,
|
| const content::URLDataSource::GotDataCallback& callback) {
|
| @@ -97,7 +97,7 @@ void FaviconSource::StartDataRequest(
|
| GURL url;
|
| int size_in_dip = 16;
|
| ui::ScaleFactor scale_factor = ui::SCALE_FACTOR_100P;
|
| - bool success = ParsePath(raw_path, &is_icon_url, &url, &size_in_dip,
|
| + bool success = ParsePath(path, &is_icon_url, &url, &size_in_dip,
|
| &scale_factor);
|
|
|
| if (!success) {
|
| @@ -160,10 +160,8 @@ bool FaviconSource::ShouldReplaceExistingSource() const {
|
| }
|
|
|
| bool FaviconSource::ShouldServiceRequest(const net::URLRequest* request) const {
|
| - if (request->url().SchemeIs(chrome::kChromeSearchScheme)) {
|
| - return InstantService::IsInstantPath(request->url()) &&
|
| - InstantIOContext::ShouldServiceRequest(request);
|
| - }
|
| + if (request->url().SchemeIs(chrome::kChromeSearchScheme))
|
| + return InstantIOContext::ShouldServiceRequest(request);
|
| return URLDataSource::ShouldServiceRequest(request);
|
| }
|
|
|
| @@ -173,7 +171,7 @@ bool FaviconSource::HandleMissingResource(const IconRequest& request) {
|
| return false;
|
| }
|
|
|
| -bool FaviconSource::ParsePath(const std::string& raw_path,
|
| +bool FaviconSource::ParsePath(const std::string& path,
|
| bool* is_icon_url,
|
| GURL* url,
|
| int* size_in_dip,
|
| @@ -185,14 +183,9 @@ bool FaviconSource::ParsePath(const std::string& raw_path,
|
| *size_in_dip = 16;
|
| *scale_factor = ui::SCALE_FACTOR_100P;
|
|
|
| - if (raw_path.empty())
|
| + if (path.empty())
|
| return false;
|
|
|
| - // Translate to regular path if |raw_path| is of the form
|
| - // chrome-search://favicon/<most_visited_item_id>, where
|
| - // "most_visited_item_id" is a uint64.
|
| - std::string path = InstantService::MaybeTranslateInstantPathOnUI(profile_,
|
| - raw_path);
|
| size_t parsed_index = 0;
|
| if (HasSubstringAt(path, parsed_index, kLargestParameter)) {
|
| parsed_index += strlen(kLargestParameter);
|
| @@ -213,8 +206,7 @@ bool FaviconSource::ParsePath(const std::string& raw_path,
|
| size_str = path.substr(parsed_index, slash - parsed_index);
|
| } else {
|
| size_str = path.substr(parsed_index, scale_delimiter - parsed_index);
|
| - scale_str = path.substr(scale_delimiter + 1,
|
| - slash - scale_delimiter - 1);
|
| + scale_str = path.substr(scale_delimiter + 1, slash - scale_delimiter - 1);
|
| }
|
|
|
| if (!base::StringToInt(size_str, size_in_dip))
|
|
|