Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/android/ntp/most_visited_sites.h" | 5 #include "chrome/browser/android/ntp/most_visited_sites.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/metrics/field_trial.h" | 11 #include "base/metrics/field_trial.h" |
| 12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
| 13 #include "base/metrics/sparse_histogram.h" | 13 #include "base/metrics/sparse_histogram.h" |
| 14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
| 15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
| 16 #include "base/strings/stringprintf.h" | 16 #include "base/strings/stringprintf.h" |
| 17 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
| 18 #include "base/time/time.h" | 18 #include "base/time/time.h" |
| 19 #include "chrome/browser/supervised_user/supervised_user_service.h" | |
| 20 #include "chrome/browser/supervised_user/supervised_user_service_factory.h" | |
| 21 #include "chrome/browser/supervised_user/supervised_user_url_filter.h" | |
| 22 #include "components/history/core/browser/top_sites.h" | 19 #include "components/history/core/browser/top_sites.h" |
| 23 #include "components/ntp_tiles/pref_names.h" | 20 #include "components/ntp_tiles/pref_names.h" |
| 24 #include "components/ntp_tiles/switches.h" | 21 #include "components/ntp_tiles/switches.h" |
| 25 #include "components/pref_registry/pref_registry_syncable.h" | 22 #include "components/pref_registry/pref_registry_syncable.h" |
| 26 #include "components/prefs/pref_service.h" | 23 #include "components/prefs/pref_service.h" |
| 27 #include "components/variations/variations_associated_data.h" | 24 #include "components/variations/variations_associated_data.h" |
| 28 #include "content/public/browser/browser_thread.h" | 25 #include "content/public/browser/browser_thread.h" |
| 29 #include "third_party/skia/include/core/SkBitmap.h" | 26 #include "third_party/skia/include/core/SkBitmap.h" |
| 30 #include "ui/gfx/codec/jpeg_codec.h" | 27 #include "ui/gfx/codec/jpeg_codec.h" |
| 31 #include "url/gurl.h" | 28 #include "url/gurl.h" |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 171 MostVisitedSites::Suggestion& | 168 MostVisitedSites::Suggestion& |
| 172 MostVisitedSites::Suggestion::operator=(Suggestion&&) = default; | 169 MostVisitedSites::Suggestion::operator=(Suggestion&&) = default; |
| 173 | 170 |
| 174 MostVisitedSites::MostVisitedSites( | 171 MostVisitedSites::MostVisitedSites( |
| 175 PrefService* prefs, | 172 PrefService* prefs, |
| 176 const TemplateURLService* template_url_service, | 173 const TemplateURLService* template_url_service, |
| 177 variations::VariationsService* variations_service, | 174 variations::VariationsService* variations_service, |
| 178 net::URLRequestContextGetter* download_context, | 175 net::URLRequestContextGetter* download_context, |
| 179 scoped_refptr<history::TopSites> top_sites, | 176 scoped_refptr<history::TopSites> top_sites, |
| 180 SuggestionsService* suggestions, | 177 SuggestionsService* suggestions, |
| 181 bool is_child_profile, | 178 MostVisitedSitesSupervisor* supervisor) |
| 182 Profile* profile) | 179 : prefs_(prefs), template_url_service_(template_url_service), |
| 183 : profile_(profile), prefs_(prefs), | |
| 184 template_url_service_(template_url_service), | |
| 185 variations_service_(variations_service), | 180 variations_service_(variations_service), |
| 186 download_context_(download_context), top_sites_(top_sites), | 181 download_context_(download_context), top_sites_(top_sites), |
| 187 suggestions_service_(suggestions), is_child_profile_(is_child_profile), | 182 suggestions_service_(suggestions), supervisor_(supervisor), |
| 188 observer_(nullptr), num_sites_(0), received_most_visited_sites_(false), | 183 observer_(nullptr), num_sites_(0), received_most_visited_sites_(false), |
| 189 received_popular_sites_(false), recorded_uma_(false), | 184 received_popular_sites_(false), recorded_uma_(false), |
| 190 scoped_observer_(this), mv_source_(SUGGESTIONS_SERVICE), | 185 scoped_observer_(this), mv_source_(SUGGESTIONS_SERVICE), |
| 191 weak_ptr_factory_(this) { | 186 weak_ptr_factory_(this) { |
| 192 SupervisedUserService* supervised_user_service = | 187 supervisor_->SetObserver(this); |
| 193 SupervisedUserServiceFactory::GetForProfile(profile_); | |
| 194 supervised_user_service->AddObserver(this); | |
| 195 } | 188 } |
| 196 | 189 |
| 197 MostVisitedSites::~MostVisitedSites() { | 190 MostVisitedSites::~MostVisitedSites() { |
| 198 SupervisedUserService* supervised_user_service = | 191 supervisor_->SetObserver(nullptr); |
| 199 SupervisedUserServiceFactory::GetForProfile(profile_); | |
| 200 supervised_user_service->RemoveObserver(this); | |
| 201 } | 192 } |
| 202 | 193 |
| 203 void MostVisitedSites::SetMostVisitedURLsObserver( | 194 void MostVisitedSites::SetMostVisitedURLsObserver( |
| 204 MostVisitedSites::Observer* observer, int num_sites) { | 195 MostVisitedSites::Observer* observer, int num_sites) { |
| 205 DCHECK(observer); | 196 DCHECK(observer); |
| 206 observer_ = observer; | 197 observer_ = observer; |
| 207 num_sites_ = num_sites; | 198 num_sites_ = num_sites; |
| 208 | 199 |
| 209 if (ShouldShowPopularSites() && | 200 if (ShouldShowPopularSites() && |
| 210 NeedPopularSites(prefs_, num_sites_)) { | 201 NeedPopularSites(prefs_, num_sites_)) { |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 344 "NewTabPage.MostVisited.%s", | 335 "NewTabPage.MostVisited.%s", |
| 345 GetSourceHistogramName(current_suggestions_[index]).c_str()); | 336 GetSourceHistogramName(current_suggestions_[index]).c_str()); |
| 346 LogHistogramEvent(histogram, index, num_sites_); | 337 LogHistogramEvent(histogram, index, num_sites_); |
| 347 | 338 |
| 348 histogram = base::StringPrintf( | 339 histogram = base::StringPrintf( |
| 349 "NewTabPage.TileTypeClicked.%s", | 340 "NewTabPage.TileTypeClicked.%s", |
| 350 GetSourceHistogramName(current_suggestions_[index]).c_str()); | 341 GetSourceHistogramName(current_suggestions_[index]).c_str()); |
| 351 LogHistogramEvent(histogram, tile_type, NUM_TILE_TYPES); | 342 LogHistogramEvent(histogram, tile_type, NUM_TILE_TYPES); |
| 352 } | 343 } |
| 353 | 344 |
| 354 void MostVisitedSites::OnURLFilterChanged() { | 345 void MostVisitedSites::OnBlockedSitesChanged() { |
| 355 BuildCurrentSuggestions(); | 346 BuildCurrentSuggestions(); |
| 356 } | 347 } |
| 357 | 348 |
| 358 // static | 349 // static |
| 359 void MostVisitedSites::RegisterProfilePrefs( | 350 void MostVisitedSites::RegisterProfilePrefs( |
| 360 user_prefs::PrefRegistrySyncable* registry) { | 351 user_prefs::PrefRegistrySyncable* registry) { |
| 361 registry->RegisterListPref(ntp_tiles::prefs::kNTPSuggestionsURL); | 352 registry->RegisterListPref(ntp_tiles::prefs::kNTPSuggestionsURL); |
| 362 registry->RegisterListPref(ntp_tiles::prefs::kNTPSuggestionsIsPersonal); | 353 registry->RegisterListPref(ntp_tiles::prefs::kNTPSuggestionsIsPersonal); |
| 363 } | 354 } |
| 364 | 355 |
| 365 void MostVisitedSites::BuildCurrentSuggestions() { | 356 void MostVisitedSites::BuildCurrentSuggestions() { |
| 366 // Get the current suggestions from cache. If the cache is empty, this will | 357 // Get the current suggestions from cache. If the cache is empty, this will |
| 367 // fall back to TopSites. | 358 // fall back to TopSites. |
| 368 OnSuggestionsProfileAvailable( | 359 OnSuggestionsProfileAvailable( |
| 369 suggestions_service_->GetSuggestionsDataFromCache()); | 360 suggestions_service_->GetSuggestionsDataFromCache()); |
| 370 } | 361 } |
| 371 | 362 |
| 372 void MostVisitedSites::InitiateTopSitesQuery() { | 363 void MostVisitedSites::InitiateTopSitesQuery() { |
| 373 if (!top_sites_) | 364 if (!top_sites_) |
| 374 return; | 365 return; |
| 375 | 366 |
| 376 top_sites_->GetMostVisitedURLs( | 367 top_sites_->GetMostVisitedURLs( |
| 377 base::Bind(&MostVisitedSites::OnMostVisitedURLsAvailable, | 368 base::Bind(&MostVisitedSites::OnMostVisitedURLsAvailable, |
| 378 weak_ptr_factory_.GetWeakPtr()), | 369 weak_ptr_factory_.GetWeakPtr()), |
| 379 false); | 370 false); |
| 380 } | 371 } |
| 381 | 372 |
| 382 base::FilePath MostVisitedSites::GetWhitelistLargeIconPath(const GURL& url) { | 373 base::FilePath MostVisitedSites::GetWhitelistLargeIconPath(const GURL& url) { |
| 383 SupervisedUserService* supervised_user_service = | 374 for (const auto& whitelist : supervisor_->whitelists()) { |
| 384 SupervisedUserServiceFactory::GetForProfile(profile_); | 375 if (AreURLsEquivalent(whitelist.entry_point, url)) |
| 385 | 376 return whitelist.large_icon_path; |
| 386 for (const auto& whitelist : supervised_user_service->whitelists()) { | |
| 387 if (AreURLsEquivalent(whitelist->entry_point(), url)) | |
| 388 return whitelist->large_icon_path(); | |
| 389 } | 377 } |
| 390 return base::FilePath(); | 378 return base::FilePath(); |
| 391 } | 379 } |
| 392 | 380 |
| 393 void MostVisitedSites::OnMostVisitedURLsAvailable( | 381 void MostVisitedSites::OnMostVisitedURLsAvailable( |
| 394 const history::MostVisitedURLList& visited_list) { | 382 const history::MostVisitedURLList& visited_list) { |
| 395 SupervisedUserURLFilter* url_filter = | |
| 396 SupervisedUserServiceFactory::GetForProfile(profile_) | |
| 397 ->GetURLFilterForUIThread(); | |
| 398 | |
| 399 MostVisitedSites::SuggestionsPtrVector suggestions; | 383 MostVisitedSites::SuggestionsPtrVector suggestions; |
| 400 size_t num_tiles = | 384 size_t num_tiles = |
| 401 std::min(visited_list.size(), static_cast<size_t>(num_sites_)); | 385 std::min(visited_list.size(), static_cast<size_t>(num_sites_)); |
| 402 for (size_t i = 0; i < num_tiles; ++i) { | 386 for (size_t i = 0; i < num_tiles; ++i) { |
| 403 const history::MostVisitedURL& visited = visited_list[i]; | 387 const history::MostVisitedURL& visited = visited_list[i]; |
| 404 if (visited.url.is_empty()) { | 388 if (visited.url.is_empty()) { |
| 405 num_tiles = i; | 389 num_tiles = i; |
| 406 break; // This is the signal that there are no more real visited sites. | 390 break; // This is the signal that there are no more real visited sites. |
| 407 } | 391 } |
| 408 if (url_filter->GetFilteringBehaviorForURL(visited.url) == | 392 if (supervisor_->IsBlocked(visited.url)) { |
|
Marc Treib
2016/05/09 08:22:48
nit: no braces required
sfiera
2016/05/09 09:33:35
Done, but the braces weren't mine.
Marc Treib
2016/05/09 09:55:12
Your change made the condition fit on one line, so
sfiera
2016/05/09 10:26:17
I guess I should have been running git cl format a
Marc Treib
2016/05/09 10:30:24
That's generally a good idea. It won't add or remo
| |
| 409 SupervisedUserURLFilter::FilteringBehavior::BLOCK) { | |
| 410 continue; | 393 continue; |
| 411 } | 394 } |
| 412 | 395 |
| 413 std::unique_ptr<Suggestion> suggestion(new Suggestion()); | 396 std::unique_ptr<Suggestion> suggestion(new Suggestion()); |
| 414 suggestion->title = visited.title; | 397 suggestion->title = visited.title; |
| 415 suggestion->url = visited.url; | 398 suggestion->url = visited.url; |
| 416 suggestion->source = TOP_SITES; | 399 suggestion->source = TOP_SITES; |
| 417 suggestion->whitelist_icon_path = GetWhitelistLargeIconPath(visited.url); | 400 suggestion->whitelist_icon_path = GetWhitelistLargeIconPath(visited.url); |
| 418 | 401 |
| 419 suggestions.push_back(std::move(suggestion)); | 402 suggestions.push_back(std::move(suggestion)); |
| 420 } | 403 } |
| 421 | 404 |
| 422 received_most_visited_sites_ = true; | 405 received_most_visited_sites_ = true; |
| 423 mv_source_ = TOP_SITES; | 406 mv_source_ = TOP_SITES; |
| 424 SaveNewNTPSuggestions(&suggestions); | 407 SaveNewNTPSuggestions(&suggestions); |
| 425 NotifyMostVisitedURLsObserver(); | 408 NotifyMostVisitedURLsObserver(); |
| 426 } | 409 } |
| 427 | 410 |
| 428 void MostVisitedSites::OnSuggestionsProfileAvailable( | 411 void MostVisitedSites::OnSuggestionsProfileAvailable( |
| 429 const SuggestionsProfile& suggestions_profile) { | 412 const SuggestionsProfile& suggestions_profile) { |
| 430 int num_tiles = suggestions_profile.suggestions_size(); | 413 int num_tiles = suggestions_profile.suggestions_size(); |
| 431 // With no server suggestions, fall back to local TopSites. | 414 // With no server suggestions, fall back to local TopSites. |
| 432 if (num_tiles == 0) { | 415 if (num_tiles == 0) { |
| 433 InitiateTopSitesQuery(); | 416 InitiateTopSitesQuery(); |
| 434 return; | 417 return; |
| 435 } | 418 } |
| 436 if (num_sites_ < num_tiles) | 419 if (num_sites_ < num_tiles) |
| 437 num_tiles = num_sites_; | 420 num_tiles = num_sites_; |
| 438 | 421 |
| 439 SupervisedUserURLFilter* url_filter = | |
| 440 SupervisedUserServiceFactory::GetForProfile(profile_) | |
| 441 ->GetURLFilterForUIThread(); | |
| 442 MostVisitedSites::SuggestionsPtrVector suggestions; | 422 MostVisitedSites::SuggestionsPtrVector suggestions; |
| 443 for (int i = 0; i < num_tiles; ++i) { | 423 for (int i = 0; i < num_tiles; ++i) { |
| 444 const ChromeSuggestion& suggestion = suggestions_profile.suggestions(i); | 424 const ChromeSuggestion& suggestion = suggestions_profile.suggestions(i); |
| 445 if (url_filter->GetFilteringBehaviorForURL(GURL(suggestion.url())) == | 425 if (supervisor_->IsBlocked(GURL(suggestion.url()))) { |
|
Marc Treib
2016/05/09 08:22:48
Also here
sfiera
2016/05/09 09:33:35
Also here.
| |
| 446 SupervisedUserURLFilter::FilteringBehavior::BLOCK) { | |
| 447 continue; | 426 continue; |
| 448 } | 427 } |
| 449 | 428 |
| 450 std::unique_ptr<Suggestion> generated_suggestion(new Suggestion()); | 429 std::unique_ptr<Suggestion> generated_suggestion(new Suggestion()); |
| 451 generated_suggestion->title = base::UTF8ToUTF16(suggestion.title()); | 430 generated_suggestion->title = base::UTF8ToUTF16(suggestion.title()); |
| 452 generated_suggestion->url = GURL(suggestion.url()); | 431 generated_suggestion->url = GURL(suggestion.url()); |
| 453 generated_suggestion->source = SUGGESTIONS_SERVICE; | 432 generated_suggestion->source = SUGGESTIONS_SERVICE; |
| 454 generated_suggestion->whitelist_icon_path = GetWhitelistLargeIconPath( | 433 generated_suggestion->whitelist_icon_path = GetWhitelistLargeIconPath( |
| 455 GURL(suggestion.url())); | 434 GURL(suggestion.url())); |
| 456 if (suggestion.providers_size() > 0) | 435 if (suggestion.providers_size() > 0) |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 467 | 446 |
| 468 MostVisitedSites::SuggestionsPtrVector | 447 MostVisitedSites::SuggestionsPtrVector |
| 469 MostVisitedSites::CreateWhitelistEntryPointSuggestions( | 448 MostVisitedSites::CreateWhitelistEntryPointSuggestions( |
| 470 const MostVisitedSites::SuggestionsPtrVector& personal_suggestions) { | 449 const MostVisitedSites::SuggestionsPtrVector& personal_suggestions) { |
| 471 size_t num_personal_suggestions = personal_suggestions.size(); | 450 size_t num_personal_suggestions = personal_suggestions.size(); |
| 472 DCHECK_LE(num_personal_suggestions, static_cast<size_t>(num_sites_)); | 451 DCHECK_LE(num_personal_suggestions, static_cast<size_t>(num_sites_)); |
| 473 | 452 |
| 474 size_t num_whitelist_suggestions = num_sites_ - num_personal_suggestions; | 453 size_t num_whitelist_suggestions = num_sites_ - num_personal_suggestions; |
| 475 MostVisitedSites::SuggestionsPtrVector whitelist_suggestions; | 454 MostVisitedSites::SuggestionsPtrVector whitelist_suggestions; |
| 476 | 455 |
| 477 SupervisedUserService* supervised_user_service = | |
| 478 SupervisedUserServiceFactory::GetForProfile(profile_); | |
| 479 SupervisedUserURLFilter* url_filter = | |
| 480 supervised_user_service->GetURLFilterForUIThread(); | |
| 481 | |
| 482 std::set<std::string> personal_hosts; | 456 std::set<std::string> personal_hosts; |
| 483 for (const auto& suggestion : personal_suggestions) | 457 for (const auto& suggestion : personal_suggestions) |
| 484 personal_hosts.insert(suggestion->url.host()); | 458 personal_hosts.insert(suggestion->url.host()); |
| 485 | 459 |
| 486 for (const auto& whitelist : supervised_user_service->whitelists()) { | 460 for (const auto& whitelist : supervisor_->whitelists()) { |
| 487 // Skip blacklisted sites. | 461 // Skip blacklisted sites. |
| 488 if (top_sites_ && top_sites_->IsBlacklisted(whitelist->entry_point())) | 462 if (top_sites_ && top_sites_->IsBlacklisted(whitelist.entry_point)) |
| 489 continue; | 463 continue; |
| 490 | 464 |
| 491 // Skip suggestions already present. | 465 // Skip suggestions already present. |
| 492 if (personal_hosts.find(whitelist->entry_point().host()) != | 466 if (personal_hosts.find(whitelist.entry_point.host()) != |
| 493 personal_hosts.end()) | 467 personal_hosts.end()) |
| 494 continue; | 468 continue; |
| 495 | 469 |
| 496 // Skip whitelist entry points that are manually blocked. | 470 // Skip whitelist entry points that are manually blocked. |
| 497 if (url_filter->GetFilteringBehaviorForURL(whitelist->entry_point()) == | 471 if (supervisor_->IsBlocked(whitelist.entry_point)) { |
|
Marc Treib
2016/05/09 08:22:48
Aaand again :)
sfiera
2016/05/09 09:33:35
Not mine either.
| |
| 498 SupervisedUserURLFilter::FilteringBehavior::BLOCK) { | |
| 499 continue; | 472 continue; |
| 500 } | 473 } |
| 501 | 474 |
| 502 std::unique_ptr<Suggestion> suggestion(new Suggestion()); | 475 std::unique_ptr<Suggestion> suggestion(new Suggestion()); |
| 503 suggestion->title = whitelist->title(); | 476 suggestion->title = whitelist.title; |
| 504 suggestion->url = whitelist->entry_point(); | 477 suggestion->url = whitelist.entry_point; |
| 505 suggestion->source = WHITELIST; | 478 suggestion->source = WHITELIST; |
| 506 suggestion->whitelist_icon_path = whitelist->large_icon_path(); | 479 suggestion->whitelist_icon_path = whitelist.large_icon_path; |
| 507 | 480 |
| 508 whitelist_suggestions.push_back(std::move(suggestion)); | 481 whitelist_suggestions.push_back(std::move(suggestion)); |
| 509 if (whitelist_suggestions.size() >= num_whitelist_suggestions) | 482 if (whitelist_suggestions.size() >= num_whitelist_suggestions) |
| 510 break; | 483 break; |
| 511 } | 484 } |
| 512 | 485 |
| 513 return whitelist_suggestions; | 486 return whitelist_suggestions; |
| 514 } | 487 } |
| 515 | 488 |
| 516 MostVisitedSites::SuggestionsPtrVector | 489 MostVisitedSites::SuggestionsPtrVector |
| 517 MostVisitedSites::CreatePopularSitesSuggestions( | 490 MostVisitedSites::CreatePopularSitesSuggestions( |
| 518 const MostVisitedSites::SuggestionsPtrVector& personal_suggestions, | 491 const MostVisitedSites::SuggestionsPtrVector& personal_suggestions, |
| 519 const MostVisitedSites::SuggestionsPtrVector& whitelist_suggestions) { | 492 const MostVisitedSites::SuggestionsPtrVector& whitelist_suggestions) { |
| 520 // For child accounts popular sites suggestions will not be added. | 493 // For child accounts popular sites suggestions will not be added. |
| 521 if (is_child_profile_) | 494 if (supervisor_->IsChildProfile()) |
| 522 return MostVisitedSites::SuggestionsPtrVector(); | 495 return MostVisitedSites::SuggestionsPtrVector(); |
| 523 | 496 |
| 524 size_t num_suggestions = | 497 size_t num_suggestions = |
| 525 personal_suggestions.size() + whitelist_suggestions.size(); | 498 personal_suggestions.size() + whitelist_suggestions.size(); |
| 526 DCHECK_LE(num_suggestions, static_cast<size_t>(num_sites_)); | 499 DCHECK_LE(num_suggestions, static_cast<size_t>(num_sites_)); |
| 527 | 500 |
| 528 // Collect non-blacklisted popular suggestions, skipping those already present | 501 // Collect non-blacklisted popular suggestions, skipping those already present |
| 529 // in the personal suggestions. | 502 // in the personal suggestions. |
| 530 size_t num_popular_sites_suggestions = num_sites_ - num_suggestions; | 503 size_t num_popular_sites_suggestions = num_sites_ - num_suggestions; |
| 531 MostVisitedSites::SuggestionsPtrVector popular_sites_suggestions; | 504 MostVisitedSites::SuggestionsPtrVector popular_sites_suggestions; |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 773 | 746 |
| 774 void MostVisitedSites::TopSitesLoaded(TopSites* top_sites) {} | 747 void MostVisitedSites::TopSitesLoaded(TopSites* top_sites) {} |
| 775 | 748 |
| 776 void MostVisitedSites::TopSitesChanged(TopSites* top_sites, | 749 void MostVisitedSites::TopSitesChanged(TopSites* top_sites, |
| 777 ChangeReason change_reason) { | 750 ChangeReason change_reason) { |
| 778 if (mv_source_ == TOP_SITES) { | 751 if (mv_source_ == TOP_SITES) { |
| 779 // The displayed suggestions are invalidated. | 752 // The displayed suggestions are invalidated. |
| 780 InitiateTopSitesQuery(); | 753 InitiateTopSitesQuery(); |
| 781 } | 754 } |
| 782 } | 755 } |
| OLD | NEW |