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 #ifndef CHROME_BROWSER_HISTORY_TOP_SITES_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_TOP_SITES_H_ |
6 #define CHROME_BROWSER_HISTORY_TOP_SITES_H_ | 6 #define CHROME_BROWSER_HISTORY_TOP_SITES_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <list> | 9 #include <list> |
10 #include <set> | 10 #include <set> |
11 #include <string> | 11 #include <string> |
12 #include <utility> | 12 #include <utility> |
13 | 13 |
14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
15 #include "base/gtest_prod_util.h" | 15 #include "base/gtest_prod_util.h" |
16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
17 #include "base/memory/ref_counted_memory.h" | 17 #include "base/memory/ref_counted_memory.h" |
18 #include "base/synchronization/lock.h" | 18 #include "base/synchronization/lock.h" |
19 #include "base/time.h" | 19 #include "base/time.h" |
20 #include "base/timer.h" | 20 #include "base/timer.h" |
21 #include "chrome/browser/history/history_types.h" | 21 #include "chrome/browser/history/history_types.h" |
22 #include "chrome/browser/history/history.h" | 22 #include "chrome/browser/history/history.h" |
23 #include "chrome/browser/history/page_usage_data.h" | 23 #include "chrome/browser/history/page_usage_data.h" |
24 #include "chrome/common/thumbnail_score.h" | 24 #include "chrome/common/thumbnail_score.h" |
25 #include "content/browser/cancelable_request.h" | 25 #include "content/browser/cancelable_request.h" |
26 #include "googleurl/src/gurl.h" | 26 #include "googleurl/src/gurl.h" |
27 | 27 |
28 class DictionaryValue; | |
29 class FilePath; | 28 class FilePath; |
30 class SkBitmap; | 29 class SkBitmap; |
31 class Profile; | 30 class Profile; |
32 | 31 |
| 32 namespace base { |
| 33 class DictionaryValue; |
| 34 } |
| 35 |
33 namespace history { | 36 namespace history { |
34 | 37 |
35 class TopSitesCache; | 38 class TopSitesCache; |
36 class TopSitesBackend; | 39 class TopSitesBackend; |
37 class TopSitesTest; | 40 class TopSitesTest; |
38 | 41 |
39 // Stores the data for the top "most visited" sites. This includes a cache of | 42 // Stores the data for the top "most visited" sites. This includes a cache of |
40 // the most visited data from history, as well as the corresponding thumbnails | 43 // the most visited data from history, as well as the corresponding thumbnails |
41 // of those sites. | 44 // of those sites. |
42 // | 45 // |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 // SetTopSites call. | 357 // SetTopSites call. |
355 TempImages temp_images_; | 358 TempImages temp_images_; |
356 | 359 |
357 // Blacklisted and pinned URLs are stored in Preferences. | 360 // Blacklisted and pinned URLs are stored in Preferences. |
358 | 361 |
359 // Blacklisted URLs. They are filtered out from the list of Top | 362 // Blacklisted URLs. They are filtered out from the list of Top |
360 // Sites when GetMostVisitedURLs is called. Note that we are still | 363 // Sites when GetMostVisitedURLs is called. Note that we are still |
361 // storing all URLs, but filtering on access. It is a dictionary, | 364 // storing all URLs, but filtering on access. It is a dictionary, |
362 // key is the URL, value is a dummy value. This is owned by the | 365 // key is the URL, value is a dummy value. This is owned by the |
363 // PrefService. | 366 // PrefService. |
364 const DictionaryValue* blacklist_; | 367 const base::DictionaryValue* blacklist_; |
365 | 368 |
366 // This is a dictionary for the pinned URLs for the the most visited part of | 369 // This is a dictionary for the pinned URLs for the the most visited part of |
367 // the new tab page. Key is the URL, value is index where it is pinned at (may | 370 // the new tab page. Key is the URL, value is index where it is pinned at (may |
368 // be the same as key). This is owned by the PrefService. | 371 // be the same as key). This is owned by the PrefService. |
369 const DictionaryValue* pinned_urls_; | 372 const base::DictionaryValue* pinned_urls_; |
370 | 373 |
371 // See description above HistoryLoadState. | 374 // See description above HistoryLoadState. |
372 HistoryLoadState history_state_; | 375 HistoryLoadState history_state_; |
373 | 376 |
374 // See description above TopSitesLoadState. | 377 // See description above TopSitesLoadState. |
375 TopSitesLoadState top_sites_state_; | 378 TopSitesLoadState top_sites_state_; |
376 | 379 |
377 // Are we loaded? | 380 // Are we loaded? |
378 bool loaded_; | 381 bool loaded_; |
379 | 382 |
380 DISALLOW_COPY_AND_ASSIGN(TopSites); | 383 DISALLOW_COPY_AND_ASSIGN(TopSites); |
381 }; | 384 }; |
382 | 385 |
383 } // namespace history | 386 } // namespace history |
384 | 387 |
385 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_H_ | 388 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_H_ |
OLD | NEW |