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 "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/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
11 #include "content/browser/appcache/chrome_appcache_service.h" | 11 #include "content/browser/appcache/chrome_appcache_service.h" |
12 #include "content/browser/chrome_blob_storage_context.h" | 12 #include "content/browser/chrome_blob_storage_context.h" |
13 #include "content/browser/download/download_id_factory.h" | 13 #include "content/browser/download/download_id_factory.h" |
14 #include "content/browser/download/download_manager.h" | 14 #include "content/browser/download/download_manager_impl.h" |
15 #include "content/browser/download/download_status_updater.h" | 15 #include "content/browser/download/download_status_updater.h" |
16 #include "content/browser/file_system/browser_file_system_helper.h" | 16 #include "content/browser/file_system/browser_file_system_helper.h" |
17 #include "content/browser/geolocation/geolocation_permission_context.h" | 17 #include "content/browser/geolocation/geolocation_permission_context.h" |
18 #include "content/browser/host_zoom_map.h" | 18 #include "content/browser/host_zoom_map.h" |
19 #include "content/browser/in_process_webkit/webkit_context.h" | 19 #include "content/browser/in_process_webkit/webkit_context.h" |
20 #include "content/browser/speech/speech_input_preferences.h" | 20 #include "content/browser/speech/speech_input_preferences.h" |
21 #include "content/browser/ssl/ssl_host_state.h" | 21 #include "content/browser/ssl/ssl_host_state.h" |
22 #include "content/public/browser/browser_thread.h" | 22 #include "content/public/browser/browser_thread.h" |
23 #include "content/shell/shell_browser_main.h" | 23 #include "content/shell/shell_browser_main.h" |
24 #include "content/shell/shell_download_manager_delegate.h" | 24 #include "content/shell/shell_download_manager_delegate.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 if (!ssl_host_state_.get()) | 120 if (!ssl_host_state_.get()) |
121 ssl_host_state_.reset(new SSLHostState()); | 121 ssl_host_state_.reset(new SSLHostState()); |
122 return ssl_host_state_.get(); | 122 return ssl_host_state_.get(); |
123 } | 123 } |
124 | 124 |
125 DownloadManager* ShellBrowserContext::GetDownloadManager() { | 125 DownloadManager* ShellBrowserContext::GetDownloadManager() { |
126 if (!download_manager_.get()) { | 126 if (!download_manager_.get()) { |
127 download_status_updater_.reset(new DownloadStatusUpdater()); | 127 download_status_updater_.reset(new DownloadStatusUpdater()); |
128 | 128 |
129 download_manager_delegate_ = new ShellDownloadManagerDelegate(); | 129 download_manager_delegate_ = new ShellDownloadManagerDelegate(); |
130 download_manager_ = new DownloadManager(download_manager_delegate_, | 130 download_manager_ = new DownloadManagerImpl(download_manager_delegate_, |
131 download_id_factory_, | 131 download_id_factory_, |
132 download_status_updater_.get()); | 132 download_status_updater_.get()); |
133 download_manager_delegate_->SetDownloadManager(download_manager_.get()); | 133 download_manager_delegate_->SetDownloadManager(download_manager_.get()); |
134 download_manager_->Init(this); | 134 download_manager_->Init(this); |
135 } | 135 } |
136 return download_manager_.get(); | 136 return download_manager_.get(); |
137 } | 137 } |
138 | 138 |
139 net::URLRequestContextGetter* ShellBrowserContext::GetRequestContext() { | 139 net::URLRequestContextGetter* ShellBrowserContext::GetRequestContext() { |
140 if (!url_request_getter_) { | 140 if (!url_request_getter_) { |
141 url_request_getter_ = new ShellURLRequestContextGetter( | 141 url_request_getter_ = new ShellURLRequestContextGetter( |
142 GetPath(), | 142 GetPath(), |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 base::Bind( | 254 base::Bind( |
255 &ChromeAppCacheService::InitializeOnIOThread, | 255 &ChromeAppCacheService::InitializeOnIOThread, |
256 appcache_service_.get(), | 256 appcache_service_.get(), |
257 IsOffTheRecord() | 257 IsOffTheRecord() |
258 ? FilePath() : GetPath().Append(FILE_PATH_LITERAL("AppCache")), | 258 ? FilePath() : GetPath().Append(FILE_PATH_LITERAL("AppCache")), |
259 &GetResourceContext(), | 259 &GetResourceContext(), |
260 special_storage_policy)); | 260 special_storage_policy)); |
261 } | 261 } |
262 | 262 |
263 } // namespace content | 263 } // namespace content |
OLD | NEW |