Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(741)

Unified Diff: components/ntp_tiles/webui/ntp_tiles_internals_message_handler.cc

Issue 2790463003: ntp_tiles: Cleanup enum names (Closed)
Patch Set: add back histogram enums Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/ntp_tiles/webui/ntp_tiles_internals_message_handler.cc
diff --git a/components/ntp_tiles/webui/ntp_tiles_internals_message_handler.cc b/components/ntp_tiles/webui/ntp_tiles_internals_message_handler.cc
index ef1e20cc86058aba31d7fe51c82b481cfaf911c8..7cc0047715401e66563dd7bd90028bf13a549b3f 100644
--- a/components/ntp_tiles/webui/ntp_tiles_internals_message_handler.cc
+++ b/components/ntp_tiles/webui/ntp_tiles_internals_message_handler.cc
@@ -98,7 +98,7 @@ void NTPTilesInternalsMessageHandler::HandleUpdate(
PrefService* prefs = client_->GetPrefs();
- if (most_visited_sites_->DoesSourceExist(ntp_tiles::NTPTileSource::POPULAR)) {
+ if (most_visited_sites_->DoesSourceExist(ntp_tiles::TileSource::POPULAR)) {
popular_sites_json_.clear();
std::string url;
@@ -139,7 +139,7 @@ void NTPTilesInternalsMessageHandler::HandleFetchSuggestions(
const base::ListValue* args) {
DCHECK_EQ(0u, args->GetSize());
if (!most_visited_sites_->DoesSourceExist(
- ntp_tiles::NTPTileSource::SUGGESTIONS_SERVICE)) {
+ ntp_tiles::TileSource::SUGGESTIONS_SERVICE)) {
return;
}
@@ -154,8 +154,7 @@ void NTPTilesInternalsMessageHandler::HandleFetchSuggestions(
void NTPTilesInternalsMessageHandler::HandleViewPopularSitesJson(
const base::ListValue* args) {
DCHECK_EQ(0u, args->GetSize());
- if (!most_visited_sites_->DoesSourceExist(
- ntp_tiles::NTPTileSource::POPULAR)) {
+ if (!most_visited_sites_->DoesSourceExist(ntp_tiles::TileSource::POPULAR)) {
return;
}
@@ -168,19 +167,18 @@ void NTPTilesInternalsMessageHandler::SendSourceInfo() {
PrefService* prefs = client_->GetPrefs();
base::DictionaryValue value;
- value.SetBoolean("topSites", most_visited_sites_->DoesSourceExist(
- NTPTileSource::TOP_SITES));
- value.SetBoolean("whitelist", most_visited_sites_->DoesSourceExist(
- NTPTileSource::WHITELIST));
+ value.SetBoolean("topSites",
+ most_visited_sites_->DoesSourceExist(TileSource::TOP_SITES));
+ value.SetBoolean("whitelist",
+ most_visited_sites_->DoesSourceExist(TileSource::WHITELIST));
- if (most_visited_sites_->DoesSourceExist(
- NTPTileSource::SUGGESTIONS_SERVICE)) {
+ if (most_visited_sites_->DoesSourceExist(TileSource::SUGGESTIONS_SERVICE)) {
value.SetString("suggestionsService.status", suggestions_status_);
} else {
value.SetBoolean("suggestionsService", false);
}
- if (most_visited_sites_->DoesSourceExist(NTPTileSource::POPULAR)) {
+ if (most_visited_sites_->DoesSourceExist(TileSource::POPULAR)) {
auto* popular_sites = most_visited_sites_->popular_sites();
value.SetString("popular.url", popular_sites->GetURLToFetch().spec());
value.SetString("popular.country", popular_sites->GetCountryToFetch());
« no previous file with comments | « components/ntp_tiles/tile_visual_type.h ('k') | components/ntp_tiles/webui/ntp_tiles_internals_message_handler_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698