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

Side by Side Diff: chrome/browser/thumbnails/thumbnail_service_impl.cc

Issue 24632002: Implementing chrome://thumbnails page to view URLs in TopSites and cached thumbnails. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Trying to fix Linux compile by reordering initializing order of weak_ptr_factory_. Created 7 years, 2 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/thumbnails/thumbnail_service_impl.h" 5 #include "chrome/browser/thumbnails/thumbnail_service_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/ref_counted_memory.h" 8 #include "base/memory/ref_counted_memory.h"
9 #include "chrome/browser/history/history_service.h" 9 #include "chrome/browser/history/history_service.h"
10 #include "chrome/browser/search/search.h" 10 #include "chrome/browser/search/search.h"
11 #include "chrome/browser/thumbnails/content_based_thumbnailing_algorithm.h" 11 #include "chrome/browser/thumbnails/content_based_thumbnailing_algorithm.h"
12 #include "chrome/browser/thumbnails/simple_thumbnail_crop.h" 12 #include "chrome/browser/thumbnails/simple_thumbnail_crop.h"
13 #include "chrome/browser/thumbnails/thumbnailing_context.h" 13 #include "chrome/browser/thumbnails/thumbnailing_context.h"
14 #include "chrome/common/chrome_switches.h" 14 #include "chrome/common/chrome_switches.h"
15 #include "url/gurl.h"
15 16
16 namespace { 17 namespace {
17 18
18 // The thumbnail size in DIP. 19 // The thumbnail size in DIP.
19 const int kThumbnailWidth = 212; 20 const int kThumbnailWidth = 212;
20 const int kThumbnailHeight = 132; 21 const int kThumbnailHeight = 132;
21 22
22 // True if thumbnail retargeting feature is enabled (Finch/flags). 23 // True if thumbnail retargeting feature is enabled (Finch/flags).
23 bool IsThumbnailRetargetingEnabled() { 24 bool IsThumbnailRetargetingEnabled() {
24 if (!chrome::IsInstantExtendedAPIEnabled()) 25 if (!chrome::IsInstantExtendedAPIEnabled())
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } 97 }
97 98
98 void ThumbnailServiceImpl::ShutdownOnUIThread() { 99 void ThumbnailServiceImpl::ShutdownOnUIThread() {
99 // Since each call uses its own scoped_refptr, we can just clear the reference 100 // Since each call uses its own scoped_refptr, we can just clear the reference
100 // here by assigning null. If another call is completed, it added its own 101 // here by assigning null. If another call is completed, it added its own
101 // reference. 102 // reference.
102 top_sites_ = NULL; 103 top_sites_ = NULL;
103 } 104 }
104 105
105 } // namespace thumbnails 106 } // namespace thumbnails
OLDNEW
« no previous file with comments | « chrome/browser/thumbnails/thumbnail_service.h ('k') | chrome/browser/ui/webui/ntp/most_visited_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698