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

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

Issue 3175023: Allow net::DirectoryLister to be used to recursively list the directory, and ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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
« no previous file with comments | « net/base/directory_lister_unittest.cc ('k') | net/url_request/url_request_file_dir_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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 10 matching lines...) Expand all
21 21
22 // URLRequestJob methods: 22 // URLRequestJob methods:
23 virtual void Start(); 23 virtual void Start();
24 virtual void StartAsync(); 24 virtual void StartAsync();
25 virtual void Kill(); 25 virtual void Kill();
26 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int *bytes_read); 26 virtual bool ReadRawData(net::IOBuffer* buf, int buf_size, int *bytes_read);
27 virtual bool GetMimeType(std::string* mime_type) const; 27 virtual bool GetMimeType(std::string* mime_type) const;
28 virtual bool GetCharset(std::string* charset); 28 virtual bool GetCharset(std::string* charset);
29 29
30 // DirectoryLister::DirectoryListerDelegate methods: 30 // DirectoryLister::DirectoryListerDelegate methods:
31 virtual void OnListFile(const file_util::FileEnumerator::FindInfo& data); 31 virtual void OnListFile(
32 const net::DirectoryLister::DirectoryListerData& data);
32 virtual void OnListDone(int error); 33 virtual void OnListDone(int error);
33 34
34 bool list_complete() const { return list_complete_; } 35 bool list_complete() const { return list_complete_; }
35 36
36 private: 37 private:
37 virtual ~URLRequestFileDirJob(); 38 virtual ~URLRequestFileDirJob();
38 39
39 void CloseLister(); 40 void CloseLister();
40 // When we have data and a read has been pending, this function 41 // When we have data and a read has been pending, this function
41 // will fill the response buffer and notify the request 42 // will fill the response buffer and notify the request
(...skipping 18 matching lines...) Expand all
60 // we wait for IO to complete. When done, we fill the buffer 61 // we wait for IO to complete. When done, we fill the buffer
61 // manually. 62 // manually.
62 bool read_pending_; 63 bool read_pending_;
63 scoped_refptr<net::IOBuffer> read_buffer_; 64 scoped_refptr<net::IOBuffer> read_buffer_;
64 int read_buffer_length_; 65 int read_buffer_length_;
65 66
66 DISALLOW_COPY_AND_ASSIGN(URLRequestFileDirJob); 67 DISALLOW_COPY_AND_ASSIGN(URLRequestFileDirJob);
67 }; 68 };
68 69
69 #endif // NET_URL_REQUEST_URL_REQUEST_FILE_DIR_JOB_H__ 70 #endif // NET_URL_REQUEST_URL_REQUEST_FILE_DIR_JOB_H__
OLDNEW
« no previous file with comments | « net/base/directory_lister_unittest.cc ('k') | net/url_request/url_request_file_dir_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698