| Index: chrome/browser/ui/webui/ntp/most_visited_handler.cc
|
| diff --git a/chrome/browser/ui/webui/ntp/most_visited_handler.cc b/chrome/browser/ui/webui/ntp/most_visited_handler.cc
|
| index 351edb285d41bb5ddee69117253c1a6226147181..9030c612137a1350e9bb39394da7a3930f5b184d 100644
|
| --- a/chrome/browser/ui/webui/ntp/most_visited_handler.cc
|
| +++ b/chrome/browser/ui/webui/ntp/most_visited_handler.cc
|
| @@ -21,7 +21,6 @@
|
| #include "base/threading/thread.h"
|
| #include "base/values.h"
|
| #include "chrome/browser/chrome_notification_types.h"
|
| -#include "chrome/browser/history/most_visited_tiles_experiment.h"
|
| #include "chrome/browser/history/page_usage_data.h"
|
| #include "chrome/browser/history/top_sites.h"
|
| #include "chrome/browser/profiles/profile.h"
|
| @@ -144,12 +143,9 @@ void MostVisitedHandler::SendPagesValue() {
|
| profile->GetPrefs()->GetDictionary(prefs::kNtpMostVisitedURLsBlacklist);
|
| bool has_blacklisted_urls = !url_blacklist->empty();
|
| history::TopSites* ts = profile->GetTopSites();
|
| - if (ts) {
|
| + if (ts)
|
| has_blacklisted_urls = ts->HasBlacklistedItems();
|
|
|
| - MaybeRemovePageValues();
|
| - }
|
| -
|
| base::FundamentalValue has_blacklisted_urls_value(has_blacklisted_urls);
|
| web_ui()->CallJavascriptFunction("ntp.setMostVisitedPages",
|
| *pages_value_,
|
| @@ -223,8 +219,6 @@ void MostVisitedHandler::SetPagesValueFromTopSites(
|
| pages_value_.reset(new base::ListValue);
|
|
|
| history::MostVisitedURLList top_sites(data);
|
| - history::MostVisitedTilesExperiment::MaybeShuffle(&top_sites);
|
| -
|
| for (size_t i = 0; i < top_sites.size(); i++) {
|
| const history::MostVisitedURL& url = top_sites[i];
|
| base::DictionaryValue* page_value = new base::DictionaryValue();
|
| @@ -269,25 +263,6 @@ std::string MostVisitedHandler::GetDictionaryKeyForUrl(const std::string& url) {
|
| return base::MD5String(url);
|
| }
|
|
|
| -void MostVisitedHandler::MaybeRemovePageValues() {
|
| - if (!history::MostVisitedTilesExperiment::IsDontShowOpenURLsEnabled())
|
| - return;
|
| -
|
| - TabStripModel* tab_strip_model = chrome::FindBrowserWithWebContents(
|
| - web_ui()->GetWebContents())->tab_strip_model();
|
| - history::TopSites* top_sites = Profile::FromWebUI(web_ui())->GetTopSites();
|
| - if (!tab_strip_model || !top_sites) {
|
| - NOTREACHED();
|
| - return;
|
| - }
|
| -
|
| - std::set<std::string> open_urls;
|
| - chrome::GetOpenUrls(*tab_strip_model, *top_sites, &open_urls);
|
| - history::MostVisitedTilesExperiment::RemovePageValuesMatchingOpenTabs(
|
| - open_urls,
|
| - pages_value_.get());
|
| -}
|
| -
|
| // static
|
| void MostVisitedHandler::RegisterProfilePrefs(
|
| user_prefs::PrefRegistrySyncable* registry) {
|
|
|