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

Unified Diff: net/url_request/url_request_file_dir_job.h

Issue 992733002: Remove //net (except for Android test stuff) and sdch (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/url_request/url_request_error_job.cc ('k') | net/url_request/url_request_file_dir_job.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_file_dir_job.h
diff --git a/net/url_request/url_request_file_dir_job.h b/net/url_request/url_request_file_dir_job.h
deleted file mode 100644
index dfb2d746dc46472cdf8c91d1d928006af51e5d93..0000000000000000000000000000000000000000
--- a/net/url_request/url_request_file_dir_job.h
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef NET_URL_REQUEST_URL_REQUEST_FILE_DIR_JOB_H_
-#define NET_URL_REQUEST_URL_REQUEST_FILE_DIR_JOB_H_
-
-#include <string>
-
-#include "base/files/file_path.h"
-#include "base/memory/weak_ptr.h"
-#include "net/base/directory_lister.h"
-#include "net/url_request/url_request_job.h"
-
-namespace net {
-
-class URLRequestFileDirJob
- : public URLRequestJob,
- public DirectoryLister::DirectoryListerDelegate {
- public:
- URLRequestFileDirJob(URLRequest* request,
- NetworkDelegate* network_delegate,
- const base::FilePath& dir_path);
-
- bool list_complete() const { return list_complete_; }
-
- virtual void StartAsync();
-
- // Overridden from URLRequestJob:
- void Start() override;
- void Kill() override;
- bool ReadRawData(IOBuffer* buf, int buf_size, int* bytes_read) override;
- bool GetMimeType(std::string* mime_type) const override;
- bool GetCharset(std::string* charset) override;
-
- // Overridden from DirectoryLister::DirectoryListerDelegate:
- void OnListFile(const DirectoryLister::DirectoryListerData& data) override;
- void OnListDone(int error) override;
-
- private:
- ~URLRequestFileDirJob() override;
-
- void CloseLister();
-
- // When we have data and a read has been pending, this function
- // will fill the response buffer and notify the request
- // appropriately.
- void CompleteRead();
-
- // Fills a buffer with the output.
- bool FillReadBuffer(char *buf, int buf_size, int *bytes_read);
-
- DirectoryLister lister_;
- base::FilePath dir_path_;
- std::string data_;
- bool canceled_;
-
- // Indicates whether we have the complete list of the dir
- bool list_complete_;
-
- // Indicates whether we have written the HTML header
- bool wrote_header_;
-
- // To simulate Async IO, we hold onto the Reader's buffer while
- // we wait for IO to complete. When done, we fill the buffer
- // manually.
- bool read_pending_;
- scoped_refptr<IOBuffer> read_buffer_;
- int read_buffer_length_;
- base::WeakPtrFactory<URLRequestFileDirJob> weak_factory_;
-
- DISALLOW_COPY_AND_ASSIGN(URLRequestFileDirJob);
-};
-
-} // namespace net
-
-#endif // NET_URL_REQUEST_URL_REQUEST_FILE_DIR_JOB_H_
« no previous file with comments | « net/url_request/url_request_error_job.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