summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui/most_visited_handler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/dom_ui/most_visited_handler.cc')
-rw-r--r--chrome/browser/dom_ui/most_visited_handler.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/chrome/browser/dom_ui/most_visited_handler.cc b/chrome/browser/dom_ui/most_visited_handler.cc
index 1670ac3..be9f9c5 100644
--- a/chrome/browser/dom_ui/most_visited_handler.cc
+++ b/chrome/browser/dom_ui/most_visited_handler.cc
@@ -151,7 +151,7 @@ void MostVisitedHandler::SendPagesValue() {
}
void MostVisitedHandler::StartQueryForMostVisited() {
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTopSites)) {
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoTopSites)) {
// Use TopSites.
history::TopSites* ts = dom_ui_->GetProfile()->GetTopSites();
ts->GetMostVisitedURLs(
@@ -213,7 +213,7 @@ void MostVisitedHandler::HandleRemoveURLsFromBlacklist(const Value* urls) {
}
UserMetrics::RecordAction(UserMetricsAction("MostVisited_UrlRemoved"),
dom_ui_->GetProfile());
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTopSites)) {
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoTopSites)) {
history::TopSites* ts = dom_ui_->GetProfile()->GetTopSites();
ts->RemoveBlacklistedURL(GURL(url));
return;
@@ -228,7 +228,7 @@ void MostVisitedHandler::HandleClearBlacklist(const Value* value) {
UserMetrics::RecordAction(UserMetricsAction("MostVisited_BlacklistCleared"),
dom_ui_->GetProfile());
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTopSites)) {
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoTopSites)) {
history::TopSites* ts = dom_ui_->GetProfile()->GetTopSites();
ts->ClearBlacklistedURLs();
return;
@@ -278,7 +278,7 @@ void MostVisitedHandler::HandleAddPinnedURL(const Value* value) {
}
void MostVisitedHandler::AddPinnedURL(const MostVisitedPage& page, int index) {
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTopSites)) {
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoTopSites)) {
history::TopSites* ts = dom_ui_->GetProfile()->GetTopSites();
ts->AddPinnedURL(page.url, index);
return;
@@ -317,7 +317,7 @@ void MostVisitedHandler::HandleRemovePinnedURL(const Value* value) {
}
void MostVisitedHandler::RemovePinnedURL(const GURL& url) {
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTopSites)) {
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoTopSites)) {
history::TopSites* ts = dom_ui_->GetProfile()->GetTopSites();
ts->RemovePinnedURL(url);
return;
@@ -487,7 +487,7 @@ void MostVisitedHandler::SetPagesValue(std::vector<PageUsageData*>* data) {
void MostVisitedHandler::SetPagesValueFromTopSites(
const history::MostVisitedURLList& data) {
- DCHECK(CommandLine::ForCurrentProcess()->HasSwitch(switches::kTopSites));
+ DCHECK(!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoTopSites));
pages_value_.reset(new ListValue);
for (size_t i = 0; i < data.size(); i++) {
const history::MostVisitedURL& url = data[i];
@@ -608,7 +608,7 @@ void MostVisitedHandler::Observe(NotificationType type,
}
void MostVisitedHandler::BlacklistURL(const GURL& url) {
- if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTopSites)) {
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoTopSites)) {
history::TopSites* ts = dom_ui_->GetProfile()->GetTopSites();
ts->AddBlacklistedURL(url);
return;