OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_DOWNLOAD_FEEDBACK_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_FEEDBACK_SERVICE_H_ |
6 #define CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_FEEDBACK_SERVICE_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_FEEDBACK_SERVICE_H_ |
7 | 7 |
| 8 #include <memory> |
8 #include <string> | 9 #include <string> |
9 #include <vector> | 10 #include <vector> |
10 | 11 |
11 #include "base/macros.h" | 12 #include "base/macros.h" |
12 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
13 #include "base/memory/scoped_ptr.h" | |
14 #include "base/threading/non_thread_safe.h" | 14 #include "base/threading/non_thread_safe.h" |
15 #include "chrome/browser/safe_browsing/download_protection_service.h" | 15 #include "chrome/browser/safe_browsing/download_protection_service.h" |
16 #include "content/public/browser/download_danger_type.h" | 16 #include "content/public/browser/download_danger_type.h" |
17 | 17 |
18 namespace base { | 18 namespace base { |
19 class TaskRunner; | 19 class TaskRunner; |
20 } | 20 } |
21 | 21 |
22 namespace content { | 22 namespace content { |
23 class DownloadItem; | 23 class DownloadItem; |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 void BeginFeedback(const std::string& ping_request, | 79 void BeginFeedback(const std::string& ping_request, |
80 const std::string& ping_response, | 80 const std::string& ping_response, |
81 const base::FilePath& path); | 81 const base::FilePath& path); |
82 void FeedbackComplete(); | 82 void FeedbackComplete(); |
83 | 83 |
84 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; | 84 scoped_refptr<net::URLRequestContextGetter> request_context_getter_; |
85 scoped_refptr<base::TaskRunner> file_task_runner_; | 85 scoped_refptr<base::TaskRunner> file_task_runner_; |
86 | 86 |
87 // Currently active & pending uploads. The first item is active, remaining | 87 // Currently active & pending uploads. The first item is active, remaining |
88 // items are pending. | 88 // items are pending. |
89 std::vector<scoped_ptr<DownloadFeedback>> active_feedback_; | 89 std::vector<std::unique_ptr<DownloadFeedback>> active_feedback_; |
90 | 90 |
91 base::WeakPtrFactory<DownloadFeedbackService> weak_ptr_factory_; | 91 base::WeakPtrFactory<DownloadFeedbackService> weak_ptr_factory_; |
92 | 92 |
93 DISALLOW_COPY_AND_ASSIGN(DownloadFeedbackService); | 93 DISALLOW_COPY_AND_ASSIGN(DownloadFeedbackService); |
94 }; | 94 }; |
95 } // namespace safe_browsing | 95 } // namespace safe_browsing |
96 | 96 |
97 #endif // CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_FEEDBACK_SERVICE_H_ | 97 #endif // CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_FEEDBACK_SERVICE_H_ |
OLD | NEW |