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

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

Issue 2786583002: chromeos: Check both original and absolute paths for file: scheme (Closed)
Patch Set: disable checks in sub classes Created 3 years, 8 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
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/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 24 matching lines...) Expand all
35 bool GetCharset(std::string* charset) override; 35 bool GetCharset(std::string* charset) override;
36 36
37 // Overridden from DirectoryLister::DirectoryListerDelegate: 37 // Overridden from DirectoryLister::DirectoryListerDelegate:
38 void OnListFile(const DirectoryLister::DirectoryListerData& data) override; 38 void OnListFile(const DirectoryLister::DirectoryListerData& data) override;
39 void OnListDone(int error) override; 39 void OnListDone(int error) override;
40 40
41 protected: 41 protected:
42 ~URLRequestFileDirJob() override; 42 ~URLRequestFileDirJob() override;
43 43
44 private: 44 private:
45 void CloseLister(); 45 // Called after the target directory path is resolved to an absolute path.
46 void DidMakeAbsolutePath(const base::FilePath& absolute_path);
46 47
47 // When we have data and a read has been pending, this function 48 // When we have data and a read has been pending, this function
48 // will fill the response buffer and notify the request 49 // will fill the response buffer and notify the request
49 // appropriately. 50 // appropriately.
50 void CompleteRead(Error error); 51 void CompleteRead(Error error);
51 52
52 int ReadBuffer(char* buf, int buf_size); 53 int ReadBuffer(char* buf, int buf_size);
53 54
54 DirectoryLister lister_; 55 DirectoryLister lister_;
55 base::FilePath dir_path_; 56 base::FilePath dir_path_;
(...skipping 18 matching lines...) Expand all
74 int read_buffer_length_; 75 int read_buffer_length_;
75 76
76 base::WeakPtrFactory<URLRequestFileDirJob> weak_factory_; 77 base::WeakPtrFactory<URLRequestFileDirJob> weak_factory_;
77 78
78 DISALLOW_COPY_AND_ASSIGN(URLRequestFileDirJob); 79 DISALLOW_COPY_AND_ASSIGN(URLRequestFileDirJob);
79 }; 80 };
80 81
81 } // namespace net 82 } // namespace net
82 83
83 #endif // NET_URL_REQUEST_URL_REQUEST_FILE_DIR_JOB_H_ 84 #endif // NET_URL_REQUEST_URL_REQUEST_FILE_DIR_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698