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

Side by Side Diff: chrome/browser/history/top_sites.cc

Issue 6186008: Linux: fix a bunch of NULL vs. 0 issues spotted by gcc 4.5. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/history/top_sites.h" 5 #include "chrome/browser/history/top_sites.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 9
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 for (std::map<GURL, size_t>::const_iterator i = all_old_urls.begin(); 436 for (std::map<GURL, size_t>::const_iterator i = all_old_urls.begin();
437 i != all_old_urls.end(); ++i) { 437 i != all_old_urls.end(); ++i) {
438 if (i->second != kAlreadyFoundMarker) 438 if (i->second != kAlreadyFoundMarker)
439 delta->deleted.push_back(old_list[i->second]); 439 delta->deleted.push_back(old_list[i->second]);
440 } 440 }
441 } 441 }
442 442
443 CancelableRequestProvider::Handle TopSites::StartQueryForMostVisited() { 443 CancelableRequestProvider::Handle TopSites::StartQueryForMostVisited() {
444 DCHECK(loaded_); 444 DCHECK(loaded_);
445 if (!profile_) 445 if (!profile_)
446 return NULL; 446 return 0;
447 447
448 HistoryService* hs = profile_->GetHistoryService(Profile::EXPLICIT_ACCESS); 448 HistoryService* hs = profile_->GetHistoryService(Profile::EXPLICIT_ACCESS);
449 // |hs| may be null during unit tests. 449 // |hs| may be null during unit tests.
450 if (hs) { 450 if (hs) {
451 return hs->QueryMostVisitedURLs( 451 return hs->QueryMostVisitedURLs(
452 num_results_to_request_from_history(), 452 num_results_to_request_from_history(),
453 kDaysOfHistory, 453 kDaysOfHistory,
454 &cancelable_consumer_, 454 &cancelable_consumer_,
455 NewCallback(this, &TopSites::OnTopSitesAvailableFromHistory)); 455 NewCallback(this, &TopSites::OnTopSitesAvailableFromHistory));
456 } 456 }
457 return NULL; 457 return 0;
458 } 458 }
459 459
460 TopSites::~TopSites() { 460 TopSites::~TopSites() {
461 } 461 }
462 462
463 bool TopSites::SetPageThumbnailNoDB(const GURL& url, 463 bool TopSites::SetPageThumbnailNoDB(const GURL& url,
464 const RefCountedBytes* thumbnail_data, 464 const RefCountedBytes* thumbnail_data,
465 const ThumbnailScore& score) { 465 const ThumbnailScore& score) {
466 // This should only be invoked when we know about the url. 466 // This should only be invoked when we know about the url.
467 DCHECK(cache_->IsKnownURL(url)); 467 DCHECK(cache_->IsKnownURL(url));
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 SetTopSites(pages); 910 SetTopSites(pages);
911 911
912 // Used only in testing. 912 // Used only in testing.
913 NotificationService::current()->Notify( 913 NotificationService::current()->Notify(
914 NotificationType::TOP_SITES_UPDATED, 914 NotificationType::TOP_SITES_UPDATED,
915 Source<TopSites>(this), 915 Source<TopSites>(this),
916 Details<CancelableRequestProvider::Handle>(&handle)); 916 Details<CancelableRequestProvider::Handle>(&handle));
917 } 917 }
918 918
919 } // namespace history 919 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/gtk/options/languages_page_gtk_unittest.cc ('k') | chrome/browser/ppapi_plugin_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698