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

Side by Side Diff: components/about_handler/url_request_about_job.h

Issue 1395643003: Fix two URLRequestJob subclasses that didn't support cancellation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
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 COMPONENTS_ABOUT_HANDLER_URL_REQUEST_ABOUT_JOB_H_ 5 #ifndef COMPONENTS_ABOUT_HANDLER_URL_REQUEST_ABOUT_JOB_H_
6 #define COMPONENTS_ABOUT_HANDLER_URL_REQUEST_ABOUT_JOB_H_ 6 #define COMPONENTS_ABOUT_HANDLER_URL_REQUEST_ABOUT_JOB_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
11 #include "net/url_request/url_request.h" 11 #include "net/url_request/url_request.h"
12 #include "net/url_request/url_request_job.h" 12 #include "net/url_request/url_request_job.h"
13 13
14 namespace about_handler { 14 namespace about_handler {
15 15
16 class URLRequestAboutJob : public net::URLRequestJob { 16 class URLRequestAboutJob : public net::URLRequestJob {
17 public: 17 public:
18 URLRequestAboutJob(net::URLRequest* request, 18 URLRequestAboutJob(net::URLRequest* request,
19 net::NetworkDelegate* network_delegate); 19 net::NetworkDelegate* network_delegate);
20 20
21 // URLRequestJob: 21 // URLRequestJob:
22 void Start() override; 22 void Start() override;
23 void Kill() override;
23 bool GetMimeType(std::string* mime_type) const override; 24 bool GetMimeType(std::string* mime_type) const override;
24 25
25 private: 26 private:
26 ~URLRequestAboutJob() override; 27 ~URLRequestAboutJob() override;
27 28
28 void StartAsync(); 29 void StartAsync();
29 30
30 base::WeakPtrFactory<URLRequestAboutJob> weak_factory_; 31 base::WeakPtrFactory<URLRequestAboutJob> weak_factory_;
31 }; 32 };
32 33
33 } // namespace about_handler 34 } // namespace about_handler
34 35
35 #endif // COMPONENTS_ABOUT_HANDLER_URL_REQUEST_ABOUT_JOB_H_ 36 #endif // COMPONENTS_ABOUT_HANDLER_URL_REQUEST_ABOUT_JOB_H_
OLDNEW
« no previous file with comments | « no previous file | components/about_handler/url_request_about_job.cc » ('j') | components/about_handler/url_request_about_job.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698