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_BACKEND_H_ | 5 #ifndef CHROME_BROWSER_HISTORY_TOP_SITES_BACKEND_H_ |
6 #define CHROME_BROWSER_HISTORY_TOP_SITES_BACKEND_H_ | 6 #define CHROME_BROWSER_HISTORY_TOP_SITES_BACKEND_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/callback_old.h" | 9 #include "base/callback_old.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 62 |
63 // Schedules a request that does nothing on the DB thread, but then notifies | 63 // Schedules a request that does nothing on the DB thread, but then notifies |
64 // the callback on the calling thread. This is used to make sure the db has | 64 // the callback on the calling thread. This is used to make sure the db has |
65 // finished processing a request. | 65 // finished processing a request. |
66 Handle DoEmptyRequest(CancelableRequestConsumerBase* consumer, | 66 Handle DoEmptyRequest(CancelableRequestConsumerBase* consumer, |
67 EmptyRequestCallback* callback); | 67 EmptyRequestCallback* callback); |
68 | 68 |
69 private: | 69 private: |
70 friend class base::RefCountedThreadSafe<TopSitesBackend>; | 70 friend class base::RefCountedThreadSafe<TopSitesBackend>; |
71 | 71 |
72 ~TopSitesBackend(); | 72 virtual ~TopSitesBackend(); |
73 | 73 |
74 // Invokes Init on the db_. | 74 // Invokes Init on the db_. |
75 void InitDBOnDBThread(const FilePath& path); | 75 void InitDBOnDBThread(const FilePath& path); |
76 | 76 |
77 // Shuts down the db. | 77 // Shuts down the db. |
78 void ShutdownDBOnDBThread(); | 78 void ShutdownDBOnDBThread(); |
79 | 79 |
80 // Does the work of getting the most visted thumbnails. | 80 // Does the work of getting the most visted thumbnails. |
81 void GetMostVisitedThumbnailsOnDBThread( | 81 void GetMostVisitedThumbnailsOnDBThread( |
82 scoped_refptr<GetMostVisitedThumbnailsRequest> request); | 82 scoped_refptr<GetMostVisitedThumbnailsRequest> request); |
(...skipping 15 matching lines...) Expand all Loading... |
98 FilePath db_path_; | 98 FilePath db_path_; |
99 | 99 |
100 scoped_ptr<TopSitesDatabase> db_; | 100 scoped_ptr<TopSitesDatabase> db_; |
101 | 101 |
102 DISALLOW_COPY_AND_ASSIGN(TopSitesBackend); | 102 DISALLOW_COPY_AND_ASSIGN(TopSitesBackend); |
103 }; | 103 }; |
104 | 104 |
105 } // namespace history | 105 } // namespace history |
106 | 106 |
107 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_BACKEND_H_ | 107 #endif // CHROME_BROWSER_HISTORY_TOP_SITES_BACKEND_H_ |
OLD | NEW |