OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_HISTOGRAM_INTERNALS_REQUEST_JOB_H_ | 5 #ifndef CONTENT_BROWSER_HISTOGRAM_INTERNALS_REQUEST_JOB_H_ |
6 #define CONTENT_BROWSER_HISTOGRAM_INTERNALS_REQUEST_JOB_H_ | 6 #define CONTENT_BROWSER_HISTOGRAM_INTERNALS_REQUEST_JOB_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/memory/weak_ptr.h" | |
11 #include "net/url_request/url_request_simple_job.h" | 12 #include "net/url_request/url_request_simple_job.h" |
12 | 13 |
13 namespace content { | 14 namespace content { |
14 | 15 |
15 class HistogramInternalsRequestJob : public net::URLRequestSimpleJob { | 16 class HistogramInternalsRequestJob : public net::URLRequestSimpleJob { |
16 public: | 17 public: |
17 HistogramInternalsRequestJob(net::URLRequest* request, | 18 HistogramInternalsRequestJob(net::URLRequest* request, |
18 net::NetworkDelegate* network_delegate); | 19 net::NetworkDelegate* network_delegate); |
19 | 20 |
21 // URLRequestSimpleJob: | |
Alexei Svitkine (slow)
2017/01/27 16:22:03
Nit: net::
bcwhite
2017/01/27 18:05:31
Done.
| |
22 void Start() override; | |
20 int GetData(std::string* mime_type, | 23 int GetData(std::string* mime_type, |
21 std::string* charset, | 24 std::string* charset, |
22 std::string* data, | 25 std::string* data, |
23 const net::CompletionCallback& callback) const override; | 26 const net::CompletionCallback& callback) const override; |
24 | 27 |
25 private: | 28 private: |
26 ~HistogramInternalsRequestJob() override {} | 29 ~HistogramInternalsRequestJob() override; |
30 | |
31 // Starts the real URL request. | |
32 void StartUrlRequest(); | |
27 | 33 |
28 // The string to select histograms which have |path_| as a substring. | 34 // The string to select histograms which have |path_| as a substring. |
29 std::string path_; | 35 std::string path_; |
30 | 36 |
37 base::WeakPtrFactory<HistogramInternalsRequestJob> weak_factory_; | |
38 | |
31 DISALLOW_IMPLICIT_CONSTRUCTORS(HistogramInternalsRequestJob); | 39 DISALLOW_IMPLICIT_CONSTRUCTORS(HistogramInternalsRequestJob); |
32 }; | 40 }; |
33 | 41 |
34 } // namespace content | 42 } // namespace content |
35 | 43 |
36 #endif // CONTENT_BROWSER_HISTOGRAM_INTERNALS_REQUEST_JOB_H_ | 44 #endif // CONTENT_BROWSER_HISTOGRAM_INTERNALS_REQUEST_JOB_H_ |
OLD | NEW |