Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(517)

Side by Side Diff: chrome/browser/download/download_history.h

Issue 7053004: Fix leak of callback object in r86518. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/download/download_history.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_DOWNLOAD_DOWNLOAD_HISTORY_H_ 5 #ifndef CHROME_BROWSER_DOWNLOAD_DOWNLOAD_HISTORY_H_
6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_HISTORY_H_ 6 #define CHROME_BROWSER_DOWNLOAD_DOWNLOAD_HISTORY_H_
7 #pragma once 7 #pragma once
8 8
9 #include <map> 9 #include <map>
10 10
(...skipping 16 matching lines...) Expand all
27 // A fake download table ID which represents a download that has started, 27 // A fake download table ID which represents a download that has started,
28 // but is not yet in the table. 28 // but is not yet in the table.
29 static const int kUninitializedHandle; 29 static const int kUninitializedHandle;
30 30
31 explicit DownloadHistory(Profile* profile); 31 explicit DownloadHistory(Profile* profile);
32 ~DownloadHistory(); 32 ~DownloadHistory();
33 33
34 // Retrieves DownloadCreateInfos saved in the history. 34 // Retrieves DownloadCreateInfos saved in the history.
35 void Load(HistoryService::DownloadQueryCallback* callback); 35 void Load(HistoryService::DownloadQueryCallback* callback);
36 36
37 // Checks whether |referrer_url| has been visited before today. 37 // Checks whether |referrer_url| has been visited before today. This takes
38 // ownership of |callback|.
38 void CheckVisitedReferrerBefore(int32 download_id, 39 void CheckVisitedReferrerBefore(int32 download_id,
39 const GURL& referrer_url, 40 const GURL& referrer_url,
40 VisitedBeforeDoneCallback* callback); 41 VisitedBeforeDoneCallback* callback);
41 42
42 // Adds a new entry for a download to the history database. 43 // Adds a new entry for a download to the history database.
43 void AddEntry(DownloadItem* download_item, 44 void AddEntry(DownloadItem* download_item,
44 HistoryService::DownloadCreateCallback* callback); 45 HistoryService::DownloadCreateCallback* callback);
45 46
46 // Updates the history entry for |download_item|. 47 // Updates the history entry for |download_item|.
47 void UpdateEntry(DownloadItem* download_item); 48 void UpdateEntry(DownloadItem* download_item);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 81
81 CancelableRequestConsumer history_consumer_; 82 CancelableRequestConsumer history_consumer_;
82 83
83 // The outstanding requests made by CheckVisitedReferrerBefore(). 84 // The outstanding requests made by CheckVisitedReferrerBefore().
84 VisitedBeforeRequestsMap visited_before_requests_; 85 VisitedBeforeRequestsMap visited_before_requests_;
85 86
86 DISALLOW_COPY_AND_ASSIGN(DownloadHistory); 87 DISALLOW_COPY_AND_ASSIGN(DownloadHistory);
87 }; 88 };
88 89
89 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_HISTORY_H_ 90 #endif // CHROME_BROWSER_DOWNLOAD_DOWNLOAD_HISTORY_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/download/download_history.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698