OLD | NEW |
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 Loading... |
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 |
OLD | NEW |