summaryrefslogtreecommitdiffstats
path: root/chrome/browser/dom_ui/most_visited_handler.cc
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-06 19:46:57 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-06 19:46:57 +0000
commitbbe192b6e32035bae275f798bd495d136a1a1d68 (patch)
tree4e094f9446b48dcf01d331b44e298fd807f61fd7 /chrome/browser/dom_ui/most_visited_handler.cc
parent145db1f5370109e0abcd324c37424dded8a501df (diff)
downloadchromium_src-bbe192b6e32035bae275f798bd495d136a1a1d68.zip
chromium_src-bbe192b6e32035bae275f798bd495d136a1a1d68.tar.gz
chromium_src-bbe192b6e32035bae275f798bd495d136a1a1d68.tar.bz2
Revert "Replace --top-sites flag with --no-top-sites flag. TopSites becomes the default."
Introduced new crashes. TBR=nshkrob Review URL: http://codereview.chromium.org/3026059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55268 0039d316-1c4b-4281-b951-d872f2087c98
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 3528a9c..e6e8ac14 100644
--- a/chrome/browser/dom_ui/most_visited_handler.cc
+++ b/chrome/browser/dom_ui/most_visited_handler.cc
@@ -150,7 +150,7 @@ void MostVisitedHandler::SendPagesValue() {
}
void MostVisitedHandler::StartQueryForMostVisited() {
- if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoTopSites)) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTopSites)) {
// Use TopSites.
history::TopSites* ts = dom_ui_->GetProfile()->GetTopSites();
ts->GetMostVisitedURLs(
@@ -212,7 +212,7 @@ void MostVisitedHandler::HandleRemoveURLsFromBlacklist(const Value* urls) {
}
UserMetrics::RecordAction(UserMetricsAction("MostVisited_UrlRemoved"),
dom_ui_->GetProfile());
- if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoTopSites)) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTopSites)) {
history::TopSites* ts = dom_ui_->GetProfile()->GetTopSites();
ts->RemoveBlacklistedURL(GURL(WideToASCII(url)));
return;
@@ -227,7 +227,7 @@ void MostVisitedHandler::HandleClearBlacklist(const Value* value) {
UserMetrics::RecordAction(UserMetricsAction("MostVisited_BlacklistCleared"),
dom_ui_->GetProfile());
- if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoTopSites)) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTopSites)) {
history::TopSites* ts = dom_ui_->GetProfile()->GetTopSites();
ts->ClearBlacklistedURLs();
return;
@@ -276,7 +276,7 @@ void MostVisitedHandler::HandleAddPinnedURL(const Value* value) {
}
void MostVisitedHandler::AddPinnedURL(const MostVisitedPage& page, int index) {
- if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoTopSites)) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTopSites)) {
history::TopSites* ts = dom_ui_->GetProfile()->GetTopSites();
ts->AddPinnedURL(page.url, index);
return;
@@ -315,7 +315,7 @@ void MostVisitedHandler::HandleRemovePinnedURL(const Value* value) {
}
void MostVisitedHandler::RemovePinnedURL(const GURL& url) {
- if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoTopSites)) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTopSites)) {
history::TopSites* ts = dom_ui_->GetProfile()->GetTopSites();
ts->RemovePinnedURL(url);
return;
@@ -485,7 +485,7 @@ void MostVisitedHandler::SetPagesValue(std::vector<PageUsageData*>* data) {
void MostVisitedHandler::SetPagesValueFromTopSites(
const history::MostVisitedURLList& data) {
- DCHECK(!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoTopSites));
+ DCHECK(CommandLine::ForCurrentProcess()->HasSwitch(switches::kTopSites));
pages_value_.reset(new ListValue);
for (size_t i = 0; i < data.size(); i++) {
const history::MostVisitedURL& url = data[i];
@@ -607,7 +607,7 @@ void MostVisitedHandler::Observe(NotificationType type,
}
void MostVisitedHandler::BlacklistURL(const GURL& url) {
- if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoTopSites)) {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTopSites)) {
history::TopSites* ts = dom_ui_->GetProfile()->GetTopSites();
ts->AddBlacklistedURL(url);
return;