| 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 a14239f57937830d2d94e0f65a5baf0d554bdeed..f3a1c6d93073f2ee4b2be95fe1cc9c536789eea6 100644
|
| --- a/chrome/browser/ui/webui/ntp/thumbnail_source.cc
|
| +++ b/chrome/browser/ui/webui/ntp/thumbnail_source.cc
|
| @@ -20,17 +20,17 @@
|
| using content::BrowserThread;
|
|
|
| // Set ThumbnailService now as Profile isn't thread safe.
|
| -ThumbnailSource::ThumbnailSource(Profile* profile, bool prefix_match)
|
| +ThumbnailSource::ThumbnailSource(Profile* profile, bool capture_thumbnails)
|
| : thumbnail_service_(ThumbnailServiceFactory::GetForProfile(profile)),
|
| profile_(profile),
|
| - prefix_match_(prefix_match) {
|
| + capture_thumbnails_(capture_thumbnails) {
|
| }
|
|
|
| ThumbnailSource::~ThumbnailSource() {
|
| }
|
|
|
| std::string ThumbnailSource::GetSource() const {
|
| - return prefix_match_ ?
|
| + return capture_thumbnails_ ?
|
| chrome::kChromeUIThumbnailHost2 : chrome::kChromeUIThumbnailHost;
|
| }
|
|
|
| @@ -40,12 +40,15 @@ void ThumbnailSource::StartDataRequest(
|
| int render_view_id,
|
| const content::URLDataSource::GotDataCallback& callback) {
|
| scoped_refptr<base::RefCountedMemory> data;
|
| - if (thumbnail_service_->GetPageThumbnail(GURL(path), prefix_match_, &data)) {
|
| + if (thumbnail_service_->GetPageThumbnail(GURL(path), capture_thumbnails_,
|
| + &data)) {
|
| // We have the thumbnail.
|
| callback.Run(data.get());
|
| } else {
|
| callback.Run(default_thumbnail_.get());
|
| }
|
| + if (capture_thumbnails_)
|
| + thumbnail_service_->AddForcedURL(GURL(path));
|
| }
|
|
|
| std::string ThumbnailSource::GetMimeType(const std::string&) const {
|
|
|