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

Side by Side Diff: content/browser/net/url_request_slow_http_job.h

Issue 7800015: prune down content_dll change to just the CONTENT_EXPORTS (Closed)
Patch Set: fix exports for switches, content_main Created 9 years, 3 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) 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 // A URLRequestMockHTTPJob class that inserts a time delay in processing. 5 // A URLRequestMockHTTPJob class that inserts a time delay in processing.
6 6
7 #ifndef CONTENT_BROWSER_NET_URL_REQUEST_SLOW_HTTP_JOB_H_ 7 #ifndef CONTENT_BROWSER_NET_URL_REQUEST_SLOW_HTTP_JOB_H_
8 #define CONTENT_BROWSER_NET_URL_REQUEST_SLOW_HTTP_JOB_H_ 8 #define CONTENT_BROWSER_NET_URL_REQUEST_SLOW_HTTP_JOB_H_
9 #pragma once 9 #pragma once
10 10
11 #include "base/timer.h" 11 #include "base/timer.h"
12 #include "content/common/content_export.h"
darin (slow to review) 2011/09/04 15:41:04 nit: "browser" before "common"
Dirk Pranke 2011/09/07 01:46:07 Done.
12 #include "content/browser/net/url_request_mock_http_job.h" 13 #include "content/browser/net/url_request_mock_http_job.h"
13 14
14 class URLRequestSlowHTTPJob : public URLRequestMockHTTPJob { 15 class URLRequestSlowHTTPJob : public URLRequestMockHTTPJob {
15 public: 16 public:
16 URLRequestSlowHTTPJob(net::URLRequest* request, const FilePath& file_path); 17 URLRequestSlowHTTPJob(net::URLRequest* request, const FilePath& file_path);
17 18
18 static const int kDelayMs; 19 static const int kDelayMs;
19 20
20 static net::URLRequest::ProtocolFactory Factory; 21 static net::URLRequest::ProtocolFactory Factory;
21 22
22 // Adds the testing URLs to the net::URLRequestFilter. 23 // Adds the testing URLs to the net::URLRequestFilter.
23 static void AddUrlHandler(const FilePath& base_path); 24 CONTENT_EXPORT static void AddUrlHandler(const FilePath& base_path);
24 25
25 // Given the path to a file relative to base_path_, construct a mock URL. 26 // Given the path to a file relative to base_path_, construct a mock URL.
26 static GURL GetMockUrl(const FilePath& path); 27 static GURL GetMockUrl(const FilePath& path);
27 28
28 virtual void Start(); 29 virtual void Start();
29 30
30 private: 31 private:
31 virtual ~URLRequestSlowHTTPJob(); 32 virtual ~URLRequestSlowHTTPJob();
32 33
33 void RealStart(); 34 void RealStart();
34 35
35 base::OneShotTimer<URLRequestSlowHTTPJob> delay_timer_; 36 base::OneShotTimer<URLRequestSlowHTTPJob> delay_timer_;
36 37
37 // This is the file path leading to the root of the directory to use as the 38 // This is the file path leading to the root of the directory to use as the
38 // root of the http server. 39 // root of the http server.
39 static FilePath base_path_; 40 static FilePath base_path_;
40 }; 41 };
41 42
42 #endif // CONTENT_BROWSER_NET_URL_REQUEST_SLOW_HTTP_JOB_H_ 43 #endif // CONTENT_BROWSER_NET_URL_REQUEST_SLOW_HTTP_JOB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698