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

Side by Side Diff: content/browser/net/url_request_abort_on_end_job.h

Issue 8404001: Add a browsertest for bug 75604 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: whoops, forgot test data Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4 // This class simulates what wininet does when a dns lookup fails.
5
6 #ifndef CONTENT_BROWSER_NET_URL_REQUEST_ABORT_ON_END_JOB_H_
7 #define CONTENT_BROWSER_NET_URL_REQUEST_ABORT_ON_END_JOB_H_
8 #pragma once
9
10 #include <string>
11
12 #include "base/basictypes.h"
13 #include "base/compiler_specific.h"
14 #include "content/common/content_export.h"
15 #include "net/url_request/url_request_job.h"
16
17 class URLRequestAbortOnEndJob : public net::URLRequestJob {
mmenke 2011/10/28 17:29:53 Think it would be nice to have some short descript
gavinp 2011/10/28 18:25:53 Done.
mmenke 2011/10/28 18:32:10 Doesn't seem to be in the last uploaded CL, but I'
18 public:
19 static const char k400AbortOnEndUrl[];
20
21 // net::URLRequestJob
22 virtual void Start() OVERRIDE;
23 virtual bool GetMimeType(std::string* mime_type) const OVERRIDE;
24 virtual void GetResponseInfo(net::HttpResponseInfo* info) OVERRIDE;
25 virtual bool ReadRawData(net::IOBuffer* buf,
26 int buf_size,
27 int *bytes_read) OVERRIDE;
28
29 static net::URLRequestJob* Factory(net::URLRequest* request,
30 const std::string& scheme);
31
32 CONTENT_EXPORT static void AddUrlHandler();
33
34 private:
35 explicit URLRequestAbortOnEndJob(net::URLRequest* request);
36 virtual ~URLRequestAbortOnEndJob();
37
38 void GetResponseInfoConst(net::HttpResponseInfo* info) const;
39 void StartAsync();
40
41 bool sent_data_;
42
43 ScopedRunnableMethodFactory<URLRequestAbortOnEndJob> method_factory_;
44
45 DISALLOW_COPY_AND_ASSIGN(URLRequestAbortOnEndJob);
46 };
47 #endif
48
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698