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

Side by Side Diff: chrome/browser/safe_browsing/malware_details_history.h

Issue 9015021: Remove DeleteTask and convert remaining users. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix last Linux gotchas (upload attempt #2) Created 8 years, 11 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
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_SAFE_BROWSING_MALWARE_DETAILS_HISTORY_H_ 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_MALWARE_DETAILS_HISTORY_H_
6 #define CHROME_BROWSER_SAFE_BROWSING_MALWARE_DETAILS_HISTORY_H_ 6 #define CHROME_BROWSER_SAFE_BROWSING_MALWARE_DETAILS_HISTORY_H_
7 #pragma once 7 #pragma once
8 8
9 // This class gets redirect chain for urls from the history service. 9 // This class gets redirect chain for urls from the history service.
10 10
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/callback.h" 14 #include "base/callback.h"
15 #include "base/hash_tables.h" 15 #include "base/hash_tables.h"
16 #include "base/memory/linked_ptr.h" 16 #include "base/memory/linked_ptr.h"
17 #include "base/memory/ref_counted.h" 17 #include "base/memory/ref_counted.h"
18 #include "base/message_loop_helpers.h"
18 #include "chrome/browser/history/history.h" 19 #include "chrome/browser/history/history.h"
19 #include "content/public/browser/browser_thread.h" 20 #include "content/public/browser/browser_thread.h"
20 #include "content/public/browser/notification_observer.h" 21 #include "content/public/browser/notification_observer.h"
21 #include "content/public/browser/notification_registrar.h" 22 #include "content/public/browser/notification_registrar.h"
22 #include "net/base/completion_callback.h" 23 #include "net/base/completion_callback.h"
23 24
24 namespace safe_browsing { 25 namespace safe_browsing {
25 typedef std::vector<GURL> RedirectChain; 26 typedef std::vector<GURL> RedirectChain;
26 } 27 }
27 28
(...skipping 14 matching lines...) Expand all
42 43
43 // Returns whether or not StartCacheCollection has been called. 44 // Returns whether or not StartCacheCollection has been called.
44 bool HasStarted() const; 45 bool HasStarted() const;
45 46
46 // Returns the redirect urls we get from history service 47 // Returns the redirect urls we get from history service
47 const std::vector<safe_browsing::RedirectChain>& GetCollectedUrls() const; 48 const std::vector<safe_browsing::RedirectChain>& GetCollectedUrls() const;
48 49
49 private: 50 private:
50 friend struct content::BrowserThread::DeleteOnThread< 51 friend struct content::BrowserThread::DeleteOnThread<
51 content::BrowserThread::UI>; 52 content::BrowserThread::UI>;
52 friend class DeleteTask<MalwareDetailsRedirectsCollector>; 53 friend class base::DeleteHelper<MalwareDetailsRedirectsCollector>;
53 54
54 Profile* profile_; 55 Profile* profile_;
55 CancelableRequestConsumer request_consumer_; 56 CancelableRequestConsumer request_consumer_;
56 57
57 // Method we call when we are done. The caller must be alive for the 58 // Method we call when we are done. The caller must be alive for the
58 // whole time, we are modifying its state (see above). 59 // whole time, we are modifying its state (see above).
59 base::Closure callback_; 60 base::Closure callback_;
60 61
61 // Sets to true once StartHistoryCollection is called 62 // Sets to true once StartHistoryCollection is called
62 bool has_started_; 63 bool has_started_;
(...skipping 19 matching lines...) Expand all
82 void AllDone(); 83 void AllDone();
83 84
84 virtual void Observe(int type, 85 virtual void Observe(int type,
85 const content::NotificationSource& source, 86 const content::NotificationSource& source,
86 const content::NotificationDetails& details) OVERRIDE; 87 const content::NotificationDetails& details) OVERRIDE;
87 88
88 DISALLOW_COPY_AND_ASSIGN(MalwareDetailsRedirectsCollector); 89 DISALLOW_COPY_AND_ASSIGN(MalwareDetailsRedirectsCollector);
89 }; 90 };
90 91
91 #endif // CHROME_BROWSER_SAFE_BROWSING_MALWARE_DETAILS_HISTORY_H_ 92 #endif // CHROME_BROWSER_SAFE_BROWSING_MALWARE_DETAILS_HISTORY_H_
OLDNEW
« no previous file with comments | « chrome/browser/safe_browsing/download_protection_service.cc ('k') | chrome/browser/safe_browsing/safe_browsing_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698