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

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

Issue 10700117: Replaced static URLRequestFileJob factory with non-static protocol handler for File jobs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed context from file_dir_job, merged with error_job cl Created 8 years, 5 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 | Annotate | Revision Log
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 NET_URL_REQUEST_URL_REQUEST_FILE_DIR_JOB_H_ 5 #ifndef NET_URL_REQUEST_URL_REQUEST_FILE_DIR_JOB_H_
6 #define NET_URL_REQUEST_URL_REQUEST_FILE_DIR_JOB_H_ 6 #define NET_URL_REQUEST_URL_REQUEST_FILE_DIR_JOB_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/file_path.h" 10 #include "base/file_path.h"
11 #include "base/file_util.h" 11 #include "base/file_util.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "net/base/directory_lister.h" 13 #include "net/base/directory_lister.h"
14 #include "net/url_request/url_request_job.h" 14 #include "net/url_request/url_request_job.h"
15 15
16 namespace net { 16 namespace net {
17 17
18 class URLRequestFileDirJob 18 class URLRequestFileDirJob
19 : public URLRequestJob, 19 : public URLRequestJob,
20 public DirectoryLister::DirectoryListerDelegate { 20 public DirectoryLister::DirectoryListerDelegate {
21 public: 21 public:
22 URLRequestFileDirJob(URLRequest* request, const FilePath& dir_path); 22 URLRequestFileDirJob(URLRequest* request,
23 NetworkDelegate* network_delegate,
24 const FilePath& dir_path);
23 25
24 bool list_complete() const { return list_complete_; } 26 bool list_complete() const { return list_complete_; }
25 27
26 virtual void StartAsync(); 28 virtual void StartAsync();
27 29
28 // Overridden from URLRequestJob: 30 // Overridden from URLRequestJob:
29 virtual void Start() OVERRIDE; 31 virtual void Start() OVERRIDE;
30 virtual void Kill() OVERRIDE; 32 virtual void Kill() OVERRIDE;
31 virtual bool ReadRawData(IOBuffer* buf, 33 virtual bool ReadRawData(IOBuffer* buf,
32 int buf_size, 34 int buf_size,
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 scoped_refptr<IOBuffer> read_buffer_; 72 scoped_refptr<IOBuffer> read_buffer_;
71 int read_buffer_length_; 73 int read_buffer_length_;
72 base::WeakPtrFactory<URLRequestFileDirJob> weak_factory_; 74 base::WeakPtrFactory<URLRequestFileDirJob> weak_factory_;
73 75
74 DISALLOW_COPY_AND_ASSIGN(URLRequestFileDirJob); 76 DISALLOW_COPY_AND_ASSIGN(URLRequestFileDirJob);
75 }; 77 };
76 78
77 } // namespace net 79 } // namespace net
78 80
79 #endif // NET_URL_REQUEST_URL_REQUEST_FILE_DIR_JOB_H_ 81 #endif // NET_URL_REQUEST_URL_REQUEST_FILE_DIR_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698