OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "content/browser/resource_context_impl.h" | 5 #include "content/browser/resource_context_impl.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "content/browser/appcache/chrome_appcache_service.h" | 8 #include "content/browser/appcache/chrome_appcache_service.h" |
9 #include "content/browser/fileapi/browser_file_system_helper.h" | 9 #include "content/browser/fileapi/browser_file_system_helper.h" |
10 #include "content/browser/fileapi/chrome_blob_storage_context.h" | 10 #include "content/browser/fileapi/chrome_blob_storage_context.h" |
| 11 #include "content/browser/histogram_internals_request_job.h" |
11 #include "content/browser/host_zoom_map_impl.h" | 12 #include "content/browser/host_zoom_map_impl.h" |
12 #include "content/browser/in_process_webkit/indexed_db_context_impl.h" | 13 #include "content/browser/in_process_webkit/indexed_db_context_impl.h" |
13 #include "content/browser/net/view_blob_internals_job_factory.h" | 14 #include "content/browser/net/view_blob_internals_job_factory.h" |
14 #include "content/browser/net/view_http_cache_job_factory.h" | 15 #include "content/browser/net/view_http_cache_job_factory.h" |
15 #include "content/browser/renderer_host/resource_dispatcher_host_impl.h" | 16 #include "content/browser/renderer_host/resource_dispatcher_host_impl.h" |
16 #include "content/browser/renderer_host/resource_request_info_impl.h" | 17 #include "content/browser/renderer_host/resource_request_info_impl.h" |
17 #include "content/browser/tcmalloc_internals_request_job.h" | 18 #include "content/browser/tcmalloc_internals_request_job.h" |
18 #include "content/public/browser/browser_context.h" | 19 #include "content/public/browser/browser_context.h" |
19 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
20 #include "content/public/common/url_constants.h" | 21 #include "content/public/common/url_constants.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 } | 113 } |
113 | 114 |
114 #if defined(USE_TCMALLOC) | 115 #if defined(USE_TCMALLOC) |
115 // Next check for chrome://tcmalloc/, which uses its own job type. | 116 // Next check for chrome://tcmalloc/, which uses its own job type. |
116 if (request->url().SchemeIs(chrome::kChromeUIScheme) && | 117 if (request->url().SchemeIs(chrome::kChromeUIScheme) && |
117 request->url().host() == chrome::kChromeUITcmallocHost) { | 118 request->url().host() == chrome::kChromeUITcmallocHost) { |
118 return new TcmallocInternalsRequestJob(request); | 119 return new TcmallocInternalsRequestJob(request); |
119 } | 120 } |
120 #endif | 121 #endif |
121 | 122 |
| 123 // Next check for chrome://histograms/, which uses its own job type. |
| 124 if (request->url().SchemeIs(chrome::kChromeUIScheme) && |
| 125 request->url().host() == chrome::kChromeUIHistogramHost) { |
| 126 return new HistogramInternalsRequestJob(request); |
| 127 } |
| 128 |
122 return NULL; | 129 return NULL; |
123 } | 130 } |
124 | 131 |
125 virtual net::URLRequestJob* MaybeInterceptRedirect( | 132 virtual net::URLRequestJob* MaybeInterceptRedirect( |
126 const GURL& location, | 133 const GURL& location, |
127 net::URLRequest* request) const OVERRIDE { | 134 net::URLRequest* request) const OVERRIDE { |
128 return NULL; | 135 return NULL; |
129 } | 136 } |
130 | 137 |
131 virtual net::URLRequestJob* MaybeInterceptResponse( | 138 virtual net::URLRequestJob* MaybeInterceptResponse( |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 BrowserThread::PostTask( | 286 BrowserThread::PostTask( |
280 BrowserThread::IO, FROM_HERE, | 287 BrowserThread::IO, FROM_HERE, |
281 base::Bind(&InitializeRequestContext, | 288 base::Bind(&InitializeRequestContext, |
282 resource_context, | 289 resource_context, |
283 make_scoped_refptr( | 290 make_scoped_refptr( |
284 browser_context->GetRequestContextForMedia()))); | 291 browser_context->GetRequestContextForMedia()))); |
285 } | 292 } |
286 } | 293 } |
287 | 294 |
288 } // namespace content | 295 } // namespace content |
OLD | NEW |