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_TRACING_CRASH_SERVICE_UPLOADER_H_ | 5 #ifndef CHROME_BROWSER_TRACING_CRASH_SERVICE_UPLOADER_H_ |
6 #define CHROME_BROWSER_TRACING_CRASH_SERVICE_UPLOADER_H_ | 6 #define CHROME_BROWSER_TRACING_CRASH_SERVICE_UPLOADER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 void AddTraceFile(const std::string& trace_filename, | 62 void AddTraceFile(const std::string& trace_filename, |
63 const std::string& trace_contents, | 63 const std::string& trace_contents, |
64 std::string* post_data); | 64 std::string* post_data); |
65 // Compresses the input and returns whether compression was successful. | 65 // Compresses the input and returns whether compression was successful. |
66 bool Compress(std::string input, | 66 bool Compress(std::string input, |
67 int max_compressed_bytes, | 67 int max_compressed_bytes, |
68 char* compressed_contents, | 68 char* compressed_contents, |
69 int* compressed_bytes); | 69 int* compressed_bytes); |
70 void CreateAndStartURLFetcher(const std::string& upload_url, | 70 void CreateAndStartURLFetcher(const std::string& upload_url, |
71 const std::string& post_data); | 71 const std::string& post_data); |
72 void OnUploadError(std::string error_message); | 72 void OnUploadError(const std::string& error_message); |
73 | 73 |
74 scoped_ptr<net::URLFetcher> url_fetcher_; | 74 scoped_ptr<net::URLFetcher> url_fetcher_; |
75 UploadProgressCallback progress_callback_; | 75 UploadProgressCallback progress_callback_; |
76 UploadDoneCallback done_callback_; | 76 UploadDoneCallback done_callback_; |
77 | 77 |
78 net::URLRequestContextGetter* request_context_; | 78 net::URLRequestContextGetter* request_context_; |
79 | 79 |
80 std::string upload_url_; | 80 std::string upload_url_; |
81 | 81 |
82 DISALLOW_COPY_AND_ASSIGN(TraceCrashServiceUploader); | 82 DISALLOW_COPY_AND_ASSIGN(TraceCrashServiceUploader); |
83 }; | 83 }; |
84 | 84 |
85 #endif // CHROME_BROWSER_TRACING_CRASH_SERVICE_UPLOADER_H_ | 85 #endif // CHROME_BROWSER_TRACING_CRASH_SERVICE_UPLOADER_H_ |
OLD | NEW |