OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SAFE_BROWSING_INCIDENT_REPORTING_LAST_DOWNLOAD_FINDER_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_LAST_DOWNLOAD_FINDER_H_ |
6 #define CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_LAST_DOWNLOAD_FINDER_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_LAST_DOWNLOAD_FINDER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 void SearchInProfile(Profile* profile); | 83 void SearchInProfile(Profile* profile); |
84 | 84 |
85 // DownloadMetadataManager::GetDownloadDetailsCallback. If |details| are | 85 // DownloadMetadataManager::GetDownloadDetailsCallback. If |details| are |
86 // provided, retrieves them if they are the most relevant results. Otherwise | 86 // provided, retrieves them if they are the most relevant results. Otherwise |
87 // begins a search in history. Reports results if there are no more pending | 87 // begins a search in history. Reports results if there are no more pending |
88 // queries. | 88 // queries. |
89 void OnMetadataQuery( | 89 void OnMetadataQuery( |
90 Profile* profile, | 90 Profile* profile, |
91 scoped_ptr<ClientIncidentReport_DownloadDetails> details); | 91 scoped_ptr<ClientIncidentReport_DownloadDetails> details); |
92 | 92 |
93 // Initiates a search in |profile| if it is in the set of profiles to be | |
94 // searched. | |
95 void OnProfileHistoryLoaded(Profile* profile, | |
96 HistoryService* history_service); | |
97 | |
98 // Abandons the search for downloads in |profile|, reporting results if there | 93 // Abandons the search for downloads in |profile|, reporting results if there |
99 // are no more pending queries. | 94 // are no more pending queries. |
100 void AbandonSearchInProfile(Profile* profile); | 95 void AbandonSearchInProfile(Profile* profile); |
101 | 96 |
102 // HistoryService::DownloadQueryCallback. Retrieves the most recent completed | 97 // HistoryService::DownloadQueryCallback. Retrieves the most recent completed |
103 // executable download from |downloads| and reports results if there are no | 98 // executable download from |downloads| and reports results if there are no |
104 // more pending queries. | 99 // more pending queries. |
105 void OnDownloadQuery( | 100 void OnDownloadQuery( |
106 Profile* profile, | 101 Profile* profile, |
107 scoped_ptr<std::vector<history::DownloadRow> > downloads); | 102 scoped_ptr<std::vector<history::DownloadRow> > downloads); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 | 145 |
151 // A factory for asynchronous operations on profiles' HistoryService. | 146 // A factory for asynchronous operations on profiles' HistoryService. |
152 base::WeakPtrFactory<LastDownloadFinder> weak_ptr_factory_; | 147 base::WeakPtrFactory<LastDownloadFinder> weak_ptr_factory_; |
153 | 148 |
154 DISALLOW_COPY_AND_ASSIGN(LastDownloadFinder); | 149 DISALLOW_COPY_AND_ASSIGN(LastDownloadFinder); |
155 }; | 150 }; |
156 | 151 |
157 } // namespace safe_browsing | 152 } // namespace safe_browsing |
158 | 153 |
159 #endif // CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_LAST_DOWNLOAD_FINDER_
H_ | 154 #endif // CHROME_BROWSER_SAFE_BROWSING_INCIDENT_REPORTING_LAST_DOWNLOAD_FINDER_
H_ |
OLD | NEW |