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

Side by Side Diff: chrome/browser/tab_contents/thumbnail_generator.cc

Issue 6625076: Removing references to off the record in comments and log messages. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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/tab_contents/thumbnail_generator.h" 5 #include "chrome/browser/tab_contents/thumbnail_generator.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <map> 8 #include <map>
9 9
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 657
658 top_sites->SetPageThumbnail(url, thumbnail, score); 658 top_sites->SetPageThumbnail(url, thumbnail, score);
659 VLOG(1) << "Thumbnail taken for " << url << ": " << score.ToString(); 659 VLOG(1) << "Thumbnail taken for " << url << ": " << score.ToString();
660 } 660 }
661 661
662 bool ThumbnailGenerator::ShouldUpdateThumbnail(Profile* profile, 662 bool ThumbnailGenerator::ShouldUpdateThumbnail(Profile* profile,
663 history::TopSites* top_sites, 663 history::TopSites* top_sites,
664 const GURL& url) { 664 const GURL& url) {
665 if (!profile || !top_sites) 665 if (!profile || !top_sites)
666 return false; 666 return false;
667 // Skip if it's in the off-the-record mode. 667 // Skip if it's in the incognito mode.
668 if (profile->IsOffTheRecord()) 668 if (profile->IsOffTheRecord())
669 return false; 669 return false;
670 // Skip if the given URL is not appropriate for history. 670 // Skip if the given URL is not appropriate for history.
671 if (!HistoryService::CanAddURL(url)) 671 if (!HistoryService::CanAddURL(url))
672 return false; 672 return false;
673 // Skip if the top sites list is full, and the URL is not known. 673 // Skip if the top sites list is full, and the URL is not known.
674 const bool is_known = top_sites->IsKnownURL(url); 674 const bool is_known = top_sites->IsKnownURL(url);
675 if (top_sites->IsFull() && !is_known) 675 if (top_sites->IsFull() && !is_known)
676 return false; 676 return false;
677 // Skip if we don't have to udpate the existing thumbnail. 677 // Skip if we don't have to udpate the existing thumbnail.
678 ThumbnailScore current_score; 678 ThumbnailScore current_score;
679 if (is_known && 679 if (is_known &&
680 top_sites->GetPageThumbnailScore(url, &current_score) && 680 top_sites->GetPageThumbnailScore(url, &current_score) &&
681 !current_score.ShouldConsiderUpdating()) 681 !current_score.ShouldConsiderUpdating())
682 return false; 682 return false;
683 683
684 return true; 684 return true;
685 } 685 }
OLDNEW
« no previous file with comments | « chrome/browser/sessions/session_service.cc ('k') | chrome/browser/tab_contents/thumbnail_generator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698