| 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_H_ | 5 #ifndef CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_FEEDBACK_H_ |
| 6 #define CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_FEEDBACK_H_ | 6 #define CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_FEEDBACK_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 #include <string> | 10 #include <string> |
| 9 | 11 |
| 10 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
| 11 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
| 12 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 13 #include "base/threading/non_thread_safe.h" | 15 #include "base/threading/non_thread_safe.h" |
| 14 #include "chrome/browser/safe_browsing/two_phase_uploader.h" | 16 #include "chrome/browser/safe_browsing/two_phase_uploader.h" |
| 15 | 17 |
| 16 namespace content { | 18 namespace content { |
| 17 class DownloadItem; | 19 class DownloadItem; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 30 static DownloadFeedback* Create( | 32 static DownloadFeedback* Create( |
| 31 net::URLRequestContextGetter* request_context_getter, | 33 net::URLRequestContextGetter* request_context_getter, |
| 32 base::TaskRunner* file_task_runner, | 34 base::TaskRunner* file_task_runner, |
| 33 const base::FilePath& file_path, | 35 const base::FilePath& file_path, |
| 34 const std::string& ping_request, | 36 const std::string& ping_request, |
| 35 const std::string& ping_response); | 37 const std::string& ping_response); |
| 36 | 38 |
| 37 // The largest file size we support uploading. | 39 // The largest file size we support uploading. |
| 38 // Note: changing this will affect the max size of | 40 // Note: changing this will affect the max size of |
| 39 // SBDownloadFeedback.SizeSuccess and SizeFailure histograms. | 41 // SBDownloadFeedback.SizeSuccess and SizeFailure histograms. |
| 40 static const int64 kMaxUploadSize; | 42 static const int64_t kMaxUploadSize; |
| 41 | 43 |
| 42 // The URL where the browser sends download feedback requests. | 44 // The URL where the browser sends download feedback requests. |
| 43 static const char kSbFeedbackURL[]; | 45 static const char kSbFeedbackURL[]; |
| 44 | 46 |
| 45 virtual ~DownloadFeedback() {} | 47 virtual ~DownloadFeedback() {} |
| 46 | 48 |
| 47 // Makes the passed |factory| the factory used to instantiate | 49 // Makes the passed |factory| the factory used to instantiate |
| 48 // a DownloadFeedback. Useful for tests. | 50 // a DownloadFeedback. Useful for tests. |
| 49 static void RegisterFactory(DownloadFeedbackFactory* factory) { | 51 static void RegisterFactory(DownloadFeedbackFactory* factory) { |
| 50 factory_ = factory; | 52 factory_ = factory; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 73 net::URLRequestContextGetter* request_context_getter, | 75 net::URLRequestContextGetter* request_context_getter, |
| 74 base::TaskRunner* file_task_runner, | 76 base::TaskRunner* file_task_runner, |
| 75 const base::FilePath& file_path, | 77 const base::FilePath& file_path, |
| 76 const std::string& ping_request, | 78 const std::string& ping_request, |
| 77 const std::string& ping_response) = 0; | 79 const std::string& ping_response) = 0; |
| 78 }; | 80 }; |
| 79 | 81 |
| 80 } // namespace safe_browsing | 82 } // namespace safe_browsing |
| 81 | 83 |
| 82 #endif // CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_FEEDBACK_H_ | 84 #endif // CHROME_BROWSER_SAFE_BROWSING_DOWNLOAD_FEEDBACK_H_ |
| OLD | NEW |