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