diff options
author | nshkrob@chromium.org <nshkrob@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-06 17:20:34 +0000 |
---|---|---|
committer | nshkrob@chromium.org <nshkrob@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-06 17:20:34 +0000 |
commit | a8ab8866ba372136850107c08afabb8079945afc (patch) | |
tree | de2942a813d6efea5f7c494f0752c0b6a622e12b /chrome/browser/dom_ui | |
parent | 6a3ca9862ab2959c6a51595323aee4fc3fae4f2a (diff) | |
download | chromium_src-a8ab8866ba372136850107c08afabb8079945afc.zip chromium_src-a8ab8866ba372136850107c08afabb8079945afc.tar.gz chromium_src-a8ab8866ba372136850107c08afabb8079945afc.tar.bz2 |
Replace --top-sites flag with --no-top-sites flag. TopSites becomes the default.
BUG=none
TEST=manual
Review URL: http://codereview.chromium.org/3054028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55244 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r-- | chrome/browser/dom_ui/dom_ui_thumbnail_source.cc | 4 | ||||
-rw-r--r-- | chrome/browser/dom_ui/most_visited_handler.cc | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/chrome/browser/dom_ui/dom_ui_thumbnail_source.cc b/chrome/browser/dom_ui/dom_ui_thumbnail_source.cc index fd6eae7..ebff335 100644 --- a/chrome/browser/dom_ui/dom_ui_thumbnail_source.cc +++ b/chrome/browser/dom_ui/dom_ui_thumbnail_source.cc @@ -28,8 +28,8 @@ DOMUIThumbnailSource::~DOMUIThumbnailSource() { void DOMUIThumbnailSource::StartDataRequest(const std::string& path, bool is_off_the_record, int request_id) { - if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kTopSites)) { - scoped_refptr<history::TopSites> top_sites = profile_->GetTopSites(); + if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoTopSites)) { + history::TopSites* top_sites = profile_->GetTopSites(); RefCountedBytes* data = NULL; if (top_sites->GetPageThumbnail(GURL(path), &data)) { // We have the thumbnail. diff --git a/chrome/browser/dom_ui/most_visited_handler.cc b/chrome/browser/dom_ui/most_visited_handler.cc index e6e8ac14..3528a9c 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::kTopSites)) { + if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoTopSites)) { // 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::kTopSites)) { + if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoTopSites)) { 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::kTopSites)) { + if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoTopSites)) { 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::kTopSites)) { + if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoTopSites)) { 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::kTopSites)) { + if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kNoTopSites)) { 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::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]; @@ -607,7 +607,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; |