| OLD | NEW |
| 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 // A URLRequestJob class that pulls the content and http headers from disk. | 5 // A URLRequestJob class that pulls the content and http headers from disk. |
| 6 | 6 |
| 7 #ifndef CHROME_BROWSER_AUTOMATION_URL_REQUEST_MOCK_HTTP_JOB_H__ | 7 #ifndef CHROME_BROWSER_AUTOMATION_URL_REQUEST_MOCK_HTTP_JOB_H__ |
| 8 #define CHROME_BROWSER_AUTOMATION_URL_REQUEST_MOCK_HTTP_JOB_H__ | 8 #define CHROME_BROWSER_AUTOMATION_URL_REQUEST_MOCK_HTTP_JOB_H__ |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 virtual void GetResponseInfo(net::HttpResponseInfo* info); | 21 virtual void GetResponseInfo(net::HttpResponseInfo* info); |
| 22 | 22 |
| 23 static URLRequest::ProtocolFactory Factory; | 23 static URLRequest::ProtocolFactory Factory; |
| 24 | 24 |
| 25 // For UI tests: adds the testing URLs to the URLRequestFilter. | 25 // For UI tests: adds the testing URLs to the URLRequestFilter. |
| 26 static void AddUITestUrls(const std::wstring& base_path); | 26 static void AddUITestUrls(const std::wstring& base_path); |
| 27 | 27 |
| 28 // Given the path to a file relative to base_path_, construct a mock URL. | 28 // Given the path to a file relative to base_path_, construct a mock URL. |
| 29 static GURL GetMockUrl(const std::wstring& path); | 29 static GURL GetMockUrl(const std::wstring& path); |
| 30 | 30 |
| 31 protected: |
| 32 static FilePath GetOnDiskPath(const std::wstring& base_path, |
| 33 URLRequest* request, |
| 34 const std::string& scheme); |
| 35 |
| 31 private: | 36 private: |
| 32 void GetResponseInfoConst(net::HttpResponseInfo* info) const; | 37 void GetResponseInfoConst(net::HttpResponseInfo* info) const; |
| 33 | 38 |
| 34 // This is the file path leading to the root of the directory to use as the | 39 // This is the file path leading to the root of the directory to use as the |
| 35 // root of the http server. | 40 // root of the http server. |
| 36 static std::wstring base_path_; | 41 static std::wstring base_path_; |
| 37 }; | 42 }; |
| 38 | 43 |
| 39 # endif // CHROME_BROWSER_AUTOMATION_URL_REQUEST_MOCK_HTTP_JOB_H__ | 44 # endif // CHROME_BROWSER_AUTOMATION_URL_REQUEST_MOCK_HTTP_JOB_H__ |
| OLD | NEW |