Commit 22180a63 authored by mathp's avatar mathp Committed by Commit bot

[Guest mode] Make sure chrome://thumbnails doesn't crash.

Checking for existence of TopSites.

BUG=407527

Review URL: https://codereview.chromium.org/507653002

Cr-Commit-Position: refs/heads/master@{#292010}
parent 454927d8
...@@ -94,6 +94,11 @@ void ThumbnailListSource::StartDataRequest( ...@@ -94,6 +94,11 @@ void ThumbnailListSource::StartDataRequest(
int render_process_id, int render_process_id,
int render_frame_id, int render_frame_id,
const content::URLDataSource::GotDataCallback& callback) { const content::URLDataSource::GotDataCallback& callback) {
if (!profile_->GetTopSites()) {
callback.Run(NULL);
return;
}
profile_->GetTopSites()->GetMostVisitedURLs( profile_->GetTopSites()->GetMostVisitedURLs(
base::Bind(&ThumbnailListSource::OnMostVisitedURLsAvailable, base::Bind(&ThumbnailListSource::OnMostVisitedURLsAvailable,
weak_ptr_factory_.GetWeakPtr(), weak_ptr_factory_.GetWeakPtr(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment