summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-07 23:03:31 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-07 23:03:31 +0000
commit5a82ad40f10c8bf3833c07c759f5c3338b916b1e (patch)
treeb2e9bfaac72a20651d9deb921e4c614d2ecfda51 /chrome/browser/dom_ui
parent036237d467bdd7880711d945fbac174c30b26a39 (diff)
downloadchromium_src-5a82ad40f10c8bf3833c07c759f5c3338b916b1e.zip
chromium_src-5a82ad40f10c8bf3833c07c759f5c3338b916b1e.tar.gz
chromium_src-5a82ad40f10c8bf3833c07c759f5c3338b916b1e.tar.bz2
Revert 61826 - Revert "Make sure TopSites is only created if enabled. TopSites was getting"
This reverts commit r61790. It may have broken Vista Tests (dbg)(1) TBR=agl@chromium.org Review URL: http://codereview.chromium.org/3549027 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61874 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r--chrome/browser/dom_ui/most_visited_handler.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/chrome/browser/dom_ui/most_visited_handler.cc b/chrome/browser/dom_ui/most_visited_handler.cc
index 95d326f..671cdb9 100644
--- a/chrome/browser/dom_ui/most_visited_handler.cc
+++ b/chrome/browser/dom_ui/most_visited_handler.cc
@@ -132,13 +132,17 @@ void MostVisitedHandler::HandleGetMostVisited(const ListValue* args) {
void MostVisitedHandler::SendPagesValue() {
if (pages_value_.get()) {
- history::TopSites* ts = dom_ui_->GetProfile()->GetTopSites();
+ bool has_blacklisted_urls = !url_blacklist_->empty();
+ if (history::TopSites::IsEnabled()) {
+ history::TopSites* ts = dom_ui_->GetProfile()->GetTopSites();
+ has_blacklisted_urls = ts->HasBlacklistedItems();
+ }
FundamentalValue first_run(IsFirstRun());
- FundamentalValue has_blacklisted_urls(ts->HasBlacklistedItems());
+ FundamentalValue has_blacklisted_urls_value(has_blacklisted_urls);
dom_ui_->CallJavascriptFunction(L"mostVisitedPages",
*(pages_value_.get()),
first_run,
- has_blacklisted_urls);
+ has_blacklisted_urls_value);
pages_value_.reset();
}
}