| Index: chrome/browser/ui/webui/ntp/thumbnail_source.cc
|
| diff --git a/chrome/browser/ui/webui/ntp/thumbnail_source.cc b/chrome/browser/ui/webui/ntp/thumbnail_source.cc
|
| index 4870107366fd2d2839de86ce5a4e2626d80d4a89..a1767d7b6d0d2db2322aa6fb1f80409c6dd242a0 100644
|
| --- a/chrome/browser/ui/webui/ntp/thumbnail_source.cc
|
| +++ b/chrome/browser/ui/webui/ntp/thumbnail_source.cc
|
| @@ -35,25 +35,10 @@ std::string ThumbnailSource::GetSource() const {
|
| }
|
|
|
| void ThumbnailSource::StartDataRequest(
|
| - const std::string& raw_path,
|
| + const std::string& path,
|
| int render_process_id,
|
| int render_view_id,
|
| const content::URLDataSource::GotDataCallback& callback) {
|
| - // Translate to regular path if |raw_path| is of the form
|
| - // chrome-search://favicon/<id> or chrome-search://thumb/<id>, where <id> is
|
| - // an integer.
|
| - std::string path = raw_path;
|
| - if (BrowserThread::CurrentlyOn(BrowserThread::IO)) {
|
| - std::map<std::string, std::string>::iterator it =
|
| - id_to_url_map_.find(raw_path);
|
| - if (it != id_to_url_map_.end()) {
|
| - path = id_to_url_map_[raw_path];
|
| - id_to_url_map_.erase(it);
|
| - }
|
| - } else if (BrowserThread::CurrentlyOn(BrowserThread::UI)) {
|
| - path = InstantService::MaybeTranslateInstantPathOnUI(profile_, raw_path);
|
| - }
|
| -
|
| scoped_refptr<base::RefCountedMemory> data;
|
| if (thumbnail_service_->GetPageThumbnail(GURL(path), &data)) {
|
| // We have the thumbnail.
|
| @@ -78,22 +63,7 @@ base::MessageLoop* ThumbnailSource::MessageLoopForRequestPath(
|
|
|
| bool ThumbnailSource::ShouldServiceRequest(
|
| const net::URLRequest* request) const {
|
| - if (request->url().SchemeIs(chrome::kChromeSearchScheme)) {
|
| - if (InstantService::IsInstantPath(request->url()) &&
|
| - InstantIOContext::ShouldServiceRequest(request)) {
|
| - // If this request will be serviced on the IO thread, then do the
|
| - // translation from raw_path to path here, where we have the |request|
|
| - // object in-hand, saving the result for later use.
|
| -
|
| - // Strip leading slash from path.
|
| - std::string raw_path = request->url().path().substr(1);
|
| - if (!MessageLoopForRequestPath(raw_path)) {
|
| - id_to_url_map_[raw_path] =
|
| - InstantService::MaybeTranslateInstantPathOnIO(request, raw_path);
|
| - }
|
| - return true;
|
| - }
|
| - return false;
|
| - }
|
| + if (request->url().SchemeIs(chrome::kChromeSearchScheme))
|
| + return InstantIOContext::ShouldServiceRequest(request);
|
| return URLDataSource::ShouldServiceRequest(request);
|
| }
|
|
|