OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/profiles/off_the_record_profile_io_data.h" | 5 #include "chrome/browser/profiles/off_the_record_profile_io_data.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
11 #include "chrome/browser/browser_process.h" | 11 #include "chrome/browser/browser_process.h" |
12 #include "chrome/browser/io_thread.h" | 12 #include "chrome/browser/io_thread.h" |
13 #include "chrome/browser/net/chrome_net_log.h" | 13 #include "chrome/browser/net/chrome_net_log.h" |
14 #include "chrome/browser/net/chrome_network_delegate.h" | 14 #include "chrome/browser/net/chrome_network_delegate.h" |
15 #include "chrome/browser/net/chrome_url_request_context.h" | 15 #include "chrome/browser/net/chrome_url_request_context.h" |
16 #include "chrome/browser/profiles/profile.h" | 16 #include "chrome/browser/profiles/profile.h" |
17 #include "chrome/common/extensions/extension.h" | 17 #include "chrome/common/extensions/extension.h" |
18 #include "chrome/common/pref_names.h" | 18 #include "chrome/common/pref_names.h" |
19 #include "chrome/common/url_constants.h" | 19 #include "chrome/common/url_constants.h" |
20 #include "content/browser/resource_context.h" | 20 #include "content/browser/resource_context.h" |
21 #include "content/public/browser/browser_thread.h" | 21 #include "content/public/browser/browser_thread.h" |
22 #include "net/base/default_origin_bound_cert_store.h" | 22 #include "net/base/default_origin_bound_cert_store.h" |
23 #include "net/base/origin_bound_cert_service.h" | 23 #include "net/base/origin_bound_cert_service.h" |
24 #include "net/ftp/ftp_network_layer.h" | 24 #include "net/ftp/ftp_network_layer.h" |
25 #include "net/http/http_cache.h" | 25 #include "net/http/http_cache.h" |
26 #include "net/http/http_server_properties_impl.h" | 26 #include "net/http/http_server_properties_impl.h" |
27 #include "webkit/database/database_tracker.h" | 27 #include "webkit/database/database_tracker.h" |
28 | 28 |
| 29 using content::BrowserThread; |
| 30 |
29 OffTheRecordProfileIOData::Handle::Handle(Profile* profile) | 31 OffTheRecordProfileIOData::Handle::Handle(Profile* profile) |
30 : io_data_(new OffTheRecordProfileIOData), | 32 : io_data_(new OffTheRecordProfileIOData), |
31 profile_(profile), | 33 profile_(profile), |
32 initialized_(false) { | 34 initialized_(false) { |
33 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 35 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
34 DCHECK(profile); | 36 DCHECK(profile); |
35 } | 37 } |
36 | 38 |
37 OffTheRecordProfileIOData::Handle::~Handle() { | 39 OffTheRecordProfileIOData::Handle::~Handle() { |
38 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 40 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 scoped_refptr<ChromeURLRequestContext> | 258 scoped_refptr<ChromeURLRequestContext> |
257 OffTheRecordProfileIOData::AcquireIsolatedAppRequestContext( | 259 OffTheRecordProfileIOData::AcquireIsolatedAppRequestContext( |
258 scoped_refptr<ChromeURLRequestContext> main_context, | 260 scoped_refptr<ChromeURLRequestContext> main_context, |
259 const std::string& app_id) const { | 261 const std::string& app_id) const { |
260 // We create per-app contexts on demand, unlike the others above. | 262 // We create per-app contexts on demand, unlike the others above. |
261 scoped_refptr<ChromeURLRequestContext> app_request_context = | 263 scoped_refptr<ChromeURLRequestContext> app_request_context = |
262 InitializeAppRequestContext(main_context, app_id); | 264 InitializeAppRequestContext(main_context, app_id); |
263 DCHECK(app_request_context); | 265 DCHECK(app_request_context); |
264 return app_request_context; | 266 return app_request_context; |
265 } | 267 } |
OLD | NEW |