OLD | NEW |
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 "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 #include "chrome/browser/history/top_sites_backend.h" | 21 #include "chrome/browser/history/top_sites_backend.h" |
22 #include "chrome/browser/history/top_sites_cache.h" | 22 #include "chrome/browser/history/top_sites_cache.h" |
23 #include "chrome/browser/prefs/pref_service.h" | 23 #include "chrome/browser/prefs/pref_service.h" |
24 #include "chrome/browser/profiles/profile.h" | 24 #include "chrome/browser/profiles/profile.h" |
25 #include "chrome/browser/tab_contents/navigation_controller.h" | 25 #include "chrome/browser/tab_contents/navigation_controller.h" |
26 #include "chrome/browser/tab_contents/navigation_entry.h" | 26 #include "chrome/browser/tab_contents/navigation_entry.h" |
27 #include "chrome/common/chrome_switches.h" | 27 #include "chrome/common/chrome_switches.h" |
28 #include "chrome/common/notification_service.h" | 28 #include "chrome/common/notification_service.h" |
29 #include "chrome/common/pref_names.h" | 29 #include "chrome/common/pref_names.h" |
30 #include "chrome/common/thumbnail_score.h" | 30 #include "chrome/common/thumbnail_score.h" |
31 #include "gfx/codec/jpeg_codec.h" | |
32 #include "grit/chromium_strings.h" | 31 #include "grit/chromium_strings.h" |
33 #include "grit/generated_resources.h" | 32 #include "grit/generated_resources.h" |
34 #include "grit/locale_settings.h" | 33 #include "grit/locale_settings.h" |
35 #include "third_party/skia/include/core/SkBitmap.h" | 34 #include "third_party/skia/include/core/SkBitmap.h" |
36 #include "ui/base/l10n/l10n_util.h" | 35 #include "ui/base/l10n/l10n_util.h" |
| 36 #include "ui/gfx/codec/jpeg_codec.h" |
37 | 37 |
38 namespace history { | 38 namespace history { |
39 | 39 |
40 // How many top sites to store in the cache. | 40 // How many top sites to store in the cache. |
41 static const size_t kTopSitesNumber = 20; | 41 static const size_t kTopSitesNumber = 20; |
42 | 42 |
43 // Max number of temporary images we'll cache. See comment above | 43 // Max number of temporary images we'll cache. See comment above |
44 // temp_images_ for details. | 44 // temp_images_ for details. |
45 static const size_t kMaxTempTopImages = 8; | 45 static const size_t kMaxTempTopImages = 8; |
46 | 46 |
(...skipping 873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
920 SetTopSites(pages); | 920 SetTopSites(pages); |
921 | 921 |
922 // Used only in testing. | 922 // Used only in testing. |
923 NotificationService::current()->Notify( | 923 NotificationService::current()->Notify( |
924 NotificationType::TOP_SITES_UPDATED, | 924 NotificationType::TOP_SITES_UPDATED, |
925 Source<TopSites>(this), | 925 Source<TopSites>(this), |
926 Details<CancelableRequestProvider::Handle>(&handle)); | 926 Details<CancelableRequestProvider::Handle>(&handle)); |
927 } | 927 } |
928 | 928 |
929 } // namespace history | 929 } // namespace history |
OLD | NEW |