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/shell/shell_browser_context.h" | 5 #include "content/shell/shell_browser_context.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/environment.h" | 8 #include "base/environment.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 | 131 |
132 SSLHostState* ShellBrowserContext::GetSSLHostState() { | 132 SSLHostState* ShellBrowserContext::GetSSLHostState() { |
133 if (!ssl_host_state_.get()) | 133 if (!ssl_host_state_.get()) |
134 ssl_host_state_.reset(new SSLHostState()); | 134 ssl_host_state_.reset(new SSLHostState()); |
135 return ssl_host_state_.get(); | 135 return ssl_host_state_.get(); |
136 } | 136 } |
137 | 137 |
138 DownloadManager* ShellBrowserContext::GetDownloadManager() { | 138 DownloadManager* ShellBrowserContext::GetDownloadManager() { |
139 if (!download_manager_.get()) { | 139 if (!download_manager_.get()) { |
140 download_manager_delegate_ = new ShellDownloadManagerDelegate(); | 140 download_manager_delegate_ = new ShellDownloadManagerDelegate(); |
141 download_manager_ = new DownloadManagerImpl(download_manager_delegate_); | 141 download_manager_ = new DownloadManagerImpl(download_manager_delegate_, |
| 142 NULL); |
142 download_manager_delegate_->SetDownloadManager(download_manager_.get()); | 143 download_manager_delegate_->SetDownloadManager(download_manager_.get()); |
143 download_manager_->Init(this); | 144 download_manager_->Init(this); |
144 } | 145 } |
145 return download_manager_.get(); | 146 return download_manager_.get(); |
146 } | 147 } |
147 | 148 |
148 net::URLRequestContextGetter* ShellBrowserContext::GetRequestContext() { | 149 net::URLRequestContextGetter* ShellBrowserContext::GetRequestContext() { |
149 if (!url_request_getter_) { | 150 if (!url_request_getter_) { |
150 url_request_getter_ = new ShellURLRequestContextGetter( | 151 url_request_getter_ = new ShellURLRequestContextGetter( |
151 GetPath(), | 152 GetPath(), |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 base::Bind( | 264 base::Bind( |
264 &ChromeAppCacheService::InitializeOnIOThread, | 265 &ChromeAppCacheService::InitializeOnIOThread, |
265 appcache_service_.get(), | 266 appcache_service_.get(), |
266 IsOffTheRecord() | 267 IsOffTheRecord() |
267 ? FilePath() : GetPath().Append(FILE_PATH_LITERAL("AppCache")), | 268 ? FilePath() : GetPath().Append(FILE_PATH_LITERAL("AppCache")), |
268 &GetResourceContext(), | 269 &GetResourceContext(), |
269 special_storage_policy)); | 270 special_storage_policy)); |
270 } | 271 } |
271 | 272 |
272 } // namespace content | 273 } // namespace content |
OLD | NEW |