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

Unified Diff: content/browser/net/url_request_slow_http_job.cc

Issue 8493016: content: Remove 16 exit time destructors and 15 static initializers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: mac compile Created 9 years, 1 month 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
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..1c62e20493d08f0e704b1262795ba9d16b5a8b54 100644
--- a/content/browser/net/url_request_slow_http_job.cc
+++ b/content/browser/net/url_request_slow_http_job.cc
@@ -10,23 +10,32 @@
static const char kMockHostname[] = "mock.slow.http";
-FilePath URLRequestSlowHTTPJob::base_path_;
+namespace {
+
+// This is the file path leading to the root of the directory to use as the
+// root of the http server. This returns a reference that can be assigned to.
+FilePath& BasePath() {
+ CR_DEFINE_STATIC_LOCAL(FilePath, base_path, ());
+ return base_path;
+}
+
+} // namespace
// 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();
« no previous file with comments | « content/browser/net/url_request_slow_http_job.h ('k') | content/browser/renderer_host/render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698