Index: content/browser/net/url_request_slow_http_job.cc |
diff --git a/content/browser/net/url_request_slow_http_job.cc b/content/browser/net/url_request_slow_http_job.cc |
index 3f1a6b69f3817e973f5c578d0b27f38fda40c272..53b62582439b3ec2bc4d8e6bd3b23e46cfc87514 100644 |
--- a/content/browser/net/url_request_slow_http_job.cc |
+++ b/content/browser/net/url_request_slow_http_job.cc |
@@ -10,23 +10,27 @@ |
static const char kMockHostname[] = "mock.slow.http"; |
-FilePath URLRequestSlowHTTPJob::base_path_; |
+// static |
+FilePath& URLRequestSlowHTTPJob::BasePath() { |
+ CR_DEFINE_STATIC_LOCAL(FilePath, base_path, ()); |
+ return base_path; |
+} |
// static |
const int URLRequestSlowHTTPJob::kDelayMs = 1000; |
using base::TimeDelta; |
-/* static */ |
+// static |
net::URLRequestJob* URLRequestSlowHTTPJob::Factory(net::URLRequest* request, |
const std::string& scheme) { |
return new URLRequestSlowHTTPJob(request, |
- GetOnDiskPath(base_path_, request, scheme)); |
+ GetOnDiskPath(BasePath(), request, scheme)); |
} |
-/* static */ |
+// static |
void URLRequestSlowHTTPJob::AddUrlHandler(const FilePath& base_path) { |
- base_path_ = base_path; |
+ BasePath() = base_path; |
// Add kMockHostname to net::URLRequestFilter. |
net::URLRequestFilter* filter = net::URLRequestFilter::GetInstance(); |