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

Side by Side Diff: net/url_request/url_request_file_job.h

Issue 15010: Implement extension:// protocol. (Closed)
Patch Set: add missing unit test Created 12 years 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
« no previous file with comments | « net/url_request/url_request_context.h ('k') | net/url_request/url_request_file_job.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 NET_URL_REQUEST_URL_REQUEST_FILE_JOB_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_FILE_JOB_H_
6 #define NET_URL_REQUEST_URL_REQUEST_FILE_JOB_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_FILE_JOB_H_
7 7
8 #include "base/file_path.h" 8 #include "base/file_path.h"
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "net/base/completion_callback.h" 10 #include "net/base/completion_callback.h"
11 #include "net/base/file_stream.h" 11 #include "net/base/file_stream.h"
12 #include "net/url_request/url_request.h" 12 #include "net/url_request/url_request.h"
13 #include "net/url_request/url_request_job.h" 13 #include "net/url_request/url_request_job.h"
14 14
15 // A request job that handles reading file URLs 15 // A request job that handles reading file URLs
16 class URLRequestFileJob : public URLRequestJob { 16 class URLRequestFileJob : public URLRequestJob {
17 public: 17 public:
18 URLRequestFileJob(URLRequest* request); 18 URLRequestFileJob(URLRequest* request, const FilePath& file_path);
19 virtual ~URLRequestFileJob(); 19 virtual ~URLRequestFileJob();
20 20
21 virtual void Start(); 21 virtual void Start();
22 virtual void Kill(); 22 virtual void Kill();
23 virtual bool ReadRawData(char* buf, int buf_size, int *bytes_read); 23 virtual bool ReadRawData(char* buf, int buf_size, int *bytes_read);
24 virtual bool IsRedirectResponse(GURL* location, int* http_status_code); 24 virtual bool IsRedirectResponse(GURL* location, int* http_status_code);
25 virtual bool GetMimeType(std::string* mime_type); 25 virtual bool GetMimeType(std::string* mime_type);
26 26
27 static URLRequest::ProtocolFactory Factory; 27 static URLRequest::ProtocolFactory Factory;
28 28
(...skipping 12 matching lines...) Expand all
41 #if defined(OS_WIN) 41 #if defined(OS_WIN)
42 class AsyncResolver; 42 class AsyncResolver;
43 friend class AsyncResolver; 43 friend class AsyncResolver;
44 scoped_refptr<AsyncResolver> async_resolver_; 44 scoped_refptr<AsyncResolver> async_resolver_;
45 #endif 45 #endif
46 46
47 DISALLOW_COPY_AND_ASSIGN(URLRequestFileJob); 47 DISALLOW_COPY_AND_ASSIGN(URLRequestFileJob);
48 }; 48 };
49 49
50 #endif // NET_URL_REQUEST_URL_REQUEST_FILE_JOB_H_ 50 #endif // NET_URL_REQUEST_URL_REQUEST_FILE_JOB_H_
OLDNEW
« no previous file with comments | « net/url_request/url_request_context.h ('k') | net/url_request/url_request_file_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698